home *** CD-ROM | disk | FTP | other *** search
- Subject: v25i004: trn 2.0 - threaded newsreader based on rn 4.4, Part01/13
- Newsgroups: comp.sources.unix
- Approved: vixie@pa.dec.com
-
- Submitted-by: davison@borland.com (Wayne Davison)
- Posting-number: Volume 25, Issue 4
- Archive-name: trn/part01
-
- [ Like all versions of rn, this one just builds and installs and runs
- with no special tweaking. If you're in the market for a new free
- newsreading tool, try this one. Especially if you miss "Notesfiles".
-
- This posting is an experiment of sorts. I packaged the shar files
- into ~90K chunks instead of ~60K chunks. If this doesn't break any-
- thing out there in news-land, I'll probably make ~90K the standard.
-
- -- mod ]
-
- #! /bin/sh
- # This is a shell archive. Remove anything before this line, then unpack
- # it by saving it into a file and typing "sh file". To overwrite existing
- # files, type "sh file -c". You can also feed this as standard input via
- # unshar, or by typing "sh <file", e.g.. If this archive is complete, you
- # will see the following message at the end:
- # "End of archive 1 (of 13)."
- # Contents: EXTERN.h INIT INTERN.h MANIFEST README addng.h art.h
- # artio.h artsrch.h artstate.h autosub.c autosub.h backpage.h
- # cheat.h decode.c decode.h final.h help.h init.h intrp.h kfile.h
- # last.h makedir.SH mbox.saver.SH mt-lint.h mt.check.SH mthreads.h
- # ng.h ngdata.h ngsrch.h ngstuff.h nntp nntp/support.patch
- # norm.saver.SH only.h patchlevel rcln.h respond.h rn.h rthreads.h
- # search.h server.c server.h.SH sw.h threads.h tm-process.c
- # tm-read.c tm-write.c unipatch.c util.h
- # Wrapped by vixie@cognition.pa.dec.com on Tue Dec 3 16:34:50 1991
- PATH=/bin:/usr/bin:/usr/ucb ; export PATH
- if test -f 'EXTERN.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'EXTERN.h'\"
- else
- echo shar: Extracting \"'EXTERN.h'\" \(817 characters\)
- sed "s/^X//" >'EXTERN.h' <<'END_OF_FILE'
- X/* $Id: EXTERN.h,v 4.4 1991/09/09 20:18:23 sob Exp sob $
- X *
- X * $Log: EXTERN.h,v $
- X * Revision 4.4 1991/09/09 20:18:23 sob
- X * release 4.4
- X *
- X *
- X *
- X */
- X/* This software is Copyright 1991 by Stan Barber.
- X *
- X * Permission is hereby granted to copy, reproduce, redistribute or otherwise
- X * use this software as long as: there is no monetary profit gained
- X * specifically from the use or reproduction of this software, it is not
- X * sold, rented, traded or otherwise marketed, and this copyright notice is
- X * included prominently in any copy made.
- X *
- X * The author make no claims as to the fitness or correctness of this software
- X * for any use whatsoever, and it is provided as is. Any use of this software
- X * is at the user's own risk.
- X */
- X
- X#undef EXT
- X#define EXT extern
- X
- X#undef INIT
- X#define INIT(x)
- X
- X#undef DOINIT
- END_OF_FILE
- if test 817 -ne `wc -c <'EXTERN.h'`; then
- echo shar: \"'EXTERN.h'\" unpacked with wrong size!
- fi
- # end of 'EXTERN.h'
- fi
- if test -f 'INIT' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'INIT'\"
- else
- echo shar: Extracting \"'INIT'\" \(8 characters\)
- sed "s/^X//" >'INIT' <<'END_OF_FILE'
- X+Hfrom
- END_OF_FILE
- if test 8 -ne `wc -c <'INIT'`; then
- echo shar: \"'INIT'\" unpacked with wrong size!
- fi
- # end of 'INIT'
- fi
- if test -f 'INTERN.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'INTERN.h'\"
- else
- echo shar: Extracting \"'INTERN.h'\" \(860 characters\)
- sed "s/^X//" >'INTERN.h' <<'END_OF_FILE'
- X/* $Id: INTERN.h,v 4.4 1991/09/09 20:18:23 sob Exp sob $
- X *
- X * $Log: INTERN.h,v $
- X * Revision 4.4 1991/09/09 20:18:23 sob
- X * release 4.4
- X *
- X *
- X *
- X */
- X/* This software is Copyright 1991 by Stan Barber.
- X *
- X * Permission is hereby granted to copy, reproduce, redistribute or otherwise
- X * use this software as long as: there is no monetary profit gained
- X * specifically from the use or reproduction of this software, it is not
- X * sold, rented, traded or otherwise marketed, and this copyright notice is
- X * included prominently in any copy made.
- X *
- X * The author make no claims as to the fitness or correctness of this software
- X * for any use whatsoever, and it is provided as is. Any use of this software
- X * is at the user's own risk.
- X */
- X
- X#undef EXT
- X#define EXT
- X
- X#undef INIT
- X#ifdef xenix
- X#define INIT(x) =x
- X#else
- X#define INIT(x) = x
- X#endif
- X
- X#define DOINIT
- END_OF_FILE
- if test 860 -ne `wc -c <'INTERN.h'`; then
- echo shar: \"'INTERN.h'\" unpacked with wrong size!
- fi
- # end of 'INTERN.h'
- fi
- if test -f 'MANIFEST' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'MANIFEST'\"
- else
- echo shar: Extracting \"'MANIFEST'\" \(7940 characters\)
- sed "s/^X//" >'MANIFEST' <<'END_OF_FILE'
- X File Name Archive # Description
- X-----------------------------------------------------------
- X Configure 12 A shell script that installs everything system dependent.
- X EXTERN.h 1 When included, makes other includes not belong to me.
- X HACKERSGUIDE 2 A brief guide to the contorted innards of [t]rn.
- X HINTS 2 Some helpful hints to get the most out of using trn.
- X INIT 1 Sample system-wide switch file.
- X INTERN.h 1 When included, makes other includes belong to me.
- X MANIFEST 1 This list of files.
- X Makefile.SH 3 The makefile.
- X NEW 5 List of new features with trn 2.0.
- X Pnews.1 2 Manual page for Pnews.
- X Pnews.SH 6 A news posting shell script that knows about -h.
- X README 1 Installation instructions and other tidbits.
- X Rnmail.1 2 Manual page for Rnmail.
- X Rnmail.SH 3 A mailer that knows about -h.
- X addng.c 3 Routines for scanning the active file for new newsgroups.
- X addng.h 1 Public info regarding addng.c.
- X art.c 8 Routines to display an article.
- X art.h 1 Public info regarding art.c.
- X artio.c 2 Reserved for the article abstract type, someday.
- X artio.h 1 Public info regarding artio.c.
- X artsrch.c 3 Routines for searching among articles.
- X artsrch.h 1 Public info regarding artsrch.c.
- X artstate.h 1 Info on the current state of the article.
- X autosub.c 1 Routines to allow automatic subscription management
- X autosub.h 1 Public info regarding autosub.c
- X backpage.c 2 Routines for paging backwards in articles.
- X backpage.h 1 Public info regarding backpage.c.
- X bits.c 7 Bitmap management functions.
- X bits.h 2 Public info regarding bits.c.
- X cheat.c 2 Routines to do lookahead of several types.
- X cheat.h 1 Public info regarding cheat.c.
- X common.h 8 Global info.
- X config.h.SH 3 Shell script to create config.h
- X decode.c 1 Routines common to the binary decoders
- X decode.h 1 Public info for the binary decoders.
- X final.c 3 Finalization (exit) routines.
- X final.h 1 Public info regarding final.c.
- X getactive.c 2 Program used by shell scripts to the active file (trrn only).
- X getdate.y 5 A yacc script for date parsing.
- X head.c 3 Header parsing routines.
- X head.h 2 Public info regarding head.c.
- X help.c 6 Help routines.
- X help.h 1 Public info regarding help.c.
- X init.c 3 Initialization (startup) routines.
- X init.h 1 Public info regarding init.c.
- X intrp.c 9 Filename expansion and % interpretation routines.
- X intrp.h 1 Public info regarding intrp.c.
- X kfile.c 3 KILL file routines.
- X kfile.h 1 Public info regarding kfile.c.
- X last.c 2 Routines for handling the .rnlast file.
- X last.h 1 Public info regarding last.c.
- X makedepend.SH 2 Shell script to generate make dependencies.
- X makedir.SH 1 Shell script to make nested subdirectories.
- X mbox.saver.SH 1 Shell script to save an article to a mailbox.
- X mt-lint.h 1 A kludge file included when lint'ing.
- X mt-misc.c 2 Miscellaneous mthreads routines
- X mt-process.c 11 Mthreads' article processing routines.
- X mt-read.c 6 Mthreads' data-file reading routines.
- X mt-write.c 4 Mthreads' data-file writing routines.
- X mt.check.SH 1 A sample mt.log checker/trimmer.
- X mthreads.8 4 The man page for mthreads.
- X mthreads.c 10 The main workloop for the mthreads database manager.
- X mthreads.h 1 The include file for accessing the 'mt' structures.
- X ndir.c 2 BSD 4.2 directory routine emulation.
- X ndir.h.SH 2 Shell script to make ndir.h file
- X newsetup.1 2 Manual page for newsetup.
- X newsetup.SH 2 Shell script to create a .newsrc file.
- X newsgroups.1 2 Manual page for newsgroups.
- X newsgroups.SH 2 Shell script to list unsubscribed newsgroups.
- X newsnews.SH 2 A motd-like file that trn may print at startup.
- X ng.c 10 Routines to display a newsgroup.
- X ng.h 1 Public info regarding ng.c.
- X ngdata.c 3 General data fetching routines for a newsgroup.
- X ngdata.h 1 Public info regarding ngdata.c.
- X ngsrch.c 2 Routines to search among newsgroups.
- X ngsrch.h 1 Public info regarding ngsrch.c.
- X ngstuff.c 4 Support routines for ng.c.
- X ngstuff.h 1 Public info regarding ng.c.
- X nntp 1 Subdirectory for NNTP support files
- X nntp/acttimes.c 4 A program to maintain active.times for NNTP or standalone
- X nntp/support.patch 1 A patch for NNTP's support dir to use acttimes.c.
- X nntp/xthread.patch 4 A patch for NNTP to add XTHREAD support.
- X norm.saver.SH 1 Shell script to save an article to a normal file.
- X only.c 2 Routines to perform newsgroup restriction.
- X only.h 1 Public info regarding only.c.
- X patchlevel 1 Indicates current patch level.
- X rcln.c 5 Routines to mung a .newsrc line.
- X rcln.h 1 Public info regarding rcln.c.
- X rcstuff.c 9 Routines to mung the .newsrc file.
- X rcstuff.h 2 Public info regarding rcstuff.c.
- X respond.c 7 Various routines for doing things with articles.
- X respond.h 1 Public info regarding respond.c.
- X rn.c 6 Main program.
- X rn.h 1 Public info regarding rn.c.
- X rt-rn.c 7 Misc. threaded routines.
- X rt-select.c 7 The thread selector.
- X rthreads.c 4 Routines that read the thread data files in reader format.
- X rthreads.h 1 The include file for accessing the 'rt' structures.
- X search.c 5 Regular expression processing ala emacs.
- X search.h 1 Public info regarding search.c.
- X server.c 1 Routines common to NNTP server calls.
- X server.h.SH 1 Public info regarding the NNTP clientlib.
- X sw.c 5 Switch processing routines.
- X sw.h 1 Public info regarding switch.c.
- X term.c 8 Terminal interface routines.
- X term.h 4 Public info regarding term.c.
- X threads.c 2 Routines common to both thread makers and readers.
- X threads.h 1 The include file for common thread structures.
- X tm-process.c 1 Tmpthread's article processing routines.
- X tm-read.c 1 Tmpthread's data-file reading routines.
- X tm-write.c 1 Tmpthread's data-file writing routines.
- X tmpthread.c 3 Generates a temporary thread file for a newsgroup.
- X trn.1 13 Manual pages for trn -- PLEASE READ.
- X unipatch.c 1 A unified diff filter for use with old versions of patch.
- X unship.c 5 Decodes ship files.
- X util.c 6 Utility routines.
- X util.h 1 Public info regarding util.c.
- X uudecode.c 4 Decodes uuencoded files.
- END_OF_FILE
- if test 7940 -ne `wc -c <'MANIFEST'`; then
- echo shar: \"'MANIFEST'\" unpacked with wrong size!
- fi
- # end of 'MANIFEST'
- fi
- if test -f 'README' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'README'\"
- else
- echo shar: Extracting \"'README'\" \(9176 characters\)
- sed "s/^X//" >'README' <<'END_OF_FILE'
- X Trn Kit, Version 2.0
- X
- X Copyright (c) 1991, Wayne Davison
- X
- X Based on rn, Version 4.4
- X
- X Copyright (c) 1985, Larry Wall
- X Copyright (c) 1991, Stan Barber
- X
- You may copy the trn kit in whole or in part as long as you don't try to
- make money off it, or pretend that you wrote it.
- X--------------------------------------------------------------------------
- X
- Please read all the directions in this file (following the brief description
- of trn) before you proceed with the installation. Failure to do so may void
- your warranty. :-)
- X
- If you're upgrading from trn 1.x, read the ** LOOK ** section in the file NEW.
- X
- After you have unpacked your kit, you should have all the files listed
- in MANIFEST.
- X
- X
- What is trn?
- X------------
- Trn is "Threaded RN" -- a newsreader that uses an article's "References:"
- to order the discussions in a very natural, reply-ordered sequence called
- X"threads." Having the replies associated with their parent articles not
- only makes following the discussion easier, but also makes it easy to back-
- track and (re-)read a specific discussion from the beginning. Trn also
- has a visual representation of the current thread in the upper right corner
- of the header, which will give you a feel for how the discussion is going
- and how the current article is related to the last one you read.
- X
- In addition, a thread browser/selector is available to make life in the big
- newsgroups a much nicer place. You can also choose to use it to browse
- through already-read articles and select the one(s) you wish to read again.
- Other nice features include the extract commands for the source and binary
- groups (that recently migrated into the mainstream rn code from trn), thread-
- oriented kill directives, a better newgroup finding strategy, and the abandon
- command.
- X
- To use all the threaded features of trn requires the maintainence of a special
- X"thread" file for each group. If you have about 5% of your newsspool size
- in free space somewhere on your system, you'll probably want to maintain a
- full database of thread files by running mthreads at regular intervals. If
- space is limited, some or all groups can be left unthreaded by mthreads, and
- trn will either read the group unthreaded or create a temporary thread file
- for the group when it is being read. This runtime threading will cause an
- delay when starting up a medium or large group, so chose this only if you
- can't spare the space.
- X
- Trn can be optionally compiled as trrn -- a NNTP-compatible newsreader that
- lets you access news from a remote news server. Each client machine must
- have access to a thread database. This can either be maintained locally
- via an NNTP version of mthreads, shared via NFS, or accessed remotely via
- the XTHREAD extention to NNTP. See the file nntp/xthread.patch for details
- about modifying NNTP 1.5.11 into an XTHREAD-compatible version.
- X
- Trn is based on the source to rn 4.4, and the threaded extensions are fully
- conditionalized. Thus, it is possible to use this source to compile both trn
- and rn. In fact, it is possible to install trn as both rn and trn (linked
- together) to maintain only one newsreader on a system where people wish to
- continue to use rn.
- X
- X
- X
- Installation
- X------------
- X
- X1) Decide where you want to put the thread files. The recommended spot
- X for people with over 5% of your /usr/spool/news size free is to place
- X a ".thread" file in each spool directory. The other alternative is
- X to create a directory for them (possibly on another drive) and enter
- X this path at the appropriate Configure question. Remember that you are
- X not required to create thread files for all groups. Some sites choose
- X to only thread high-volume discussion groups (see the mthreads manpage),
- X which will lower the amount of space required for thread files. All
- X other groups can be threaded on the fly when trn is running, if the
- X user desires to do so. If you are making an NNTP XTHREAD version of
- X trn, then you must read the file nntp/xthread.patch and follow its
- X directions first.
- X
- X2) If you are trying to make the NNTP version of trn, be sure you have
- X installed the NNTP inews. Trrn expects that the NNTP is at least
- X version 1.5. You will need the source to nntp (at least the stuff
- X in the common directory) to respond to Configure's question about
- X where the root of the nntp source tree resides.
- X
- X The thread database created by mthreads must be accessable on each
- X machine, which means that NNTP machines will need to maintain a local
- X copy (usually by running the NNTP version of mthreads), or share a
- X common copy (via either NFS or XTHREADS).
- X
- X3) Run Configure. This will figure out various things about your system.
- X Some things Configure will figure out for itself, other things it will
- X ask you about. It will then proceed to make config.h, config.sh, the
- X Makefile, and a bunch of shell scripts. It will also do a make depend
- X for you, or let you start one in the background. You might possibly
- X have to trim # comments from the front of Configure if your sh doesn't
- X handle them, but all other # comments will be taken care of.
- X
- X4) Glance through config.h and common.h to make sure system dependencies
- X are correct. Most of them should have been taken care of by running
- X the Configure script.
- X
- X If you have any additional changes to make to the C definitions, they
- X can be done in the Makefile, in config.h, or in common.h. If you have
- X strange mailboxes on your system you should modify mbox.saver to correctly
- X append an article to a mailbox or folder.
- X
- X If you are on a machine with limited address space, you may have to
- X remove some of the special functions of trn to make it fit. This is
- X easily done by undefining symbols in the System Dependencies section
- X of common.h. You should run "make depend" again to be safe.
- X
- X5) make
- X
- X This will attempt to make trn, tmpthread, and (usually) mthreads in the
- X current directory.
- X
- X6) make install
- X
- X This will put trn, tmpthreads, newsetup, newsgroups, Pnews, and Rnmail
- X into a public directory (normally /usr/local/bin), and put a number of
- X files -- including mthreads (the database manager executable) -- into
- X the private trn library (e.g. /usr/local/lib/trn). It will also try to
- X put the trn man page in a reasonable place.
- X
- X7) Read the manual entry before running trn, or at least read the file
- X NEW if you are already familiar with trn. Those that are brand new
- X to trn can get a quick idea of what's different from rn by reading
- X the WHAT'S NEW section of the man page. Also check out the HINTS
- X file for some ways to get the most out of using trn.
- X
- X8) Try trn, and play with some of the switches. Use the -a option with -x
- X to read each group threaded without having to create thread files (yet).
- X Also try the -X option. Any options you find that you want to make the
- X default for everyone can be placed into the INIT file in the trn library.
- X Personal defaults can be put in a file and the environment variable TRNINIT
- X defined to point to it.
- X
- X9) Once trn is running ok, you'll probably want to create a database of
- X thread files to shorten the startup time for entering a group. If you
- X like, you can start small with a command like: "mthreads rec.humor.funny"
- X just to see if things are working, and then add more hierarchies with a
- X command like "mthreads news". To turn on all groups, use the command
- X "mthreads all" (one time). See the man page for details.
- X
- X10) Arrange to have the mthreads command of your choosing run on a regular
- X basis. If you run with the daemon flag, you can start it from the boot
- X sequence (make sure it is su'ed appropriately), or even run it daily
- X out of cron (if it's already running, the new version will exit). If
- X you run mthreads in single-pass mode, you'll want to have cron execute
- X it regularly with the standard-output redirected to /dev/null.
- X
- X11) IMPORTANT! Help save the world! Communicate any problems and suggested
- X patches to Wayne Davison (davison@borland.com) so we can keep the world
- X in sync. If you have a problem, there's someone else out there who either
- X has had or will have the same problem. If the problem affects regular rn,
- X code, I will pass it on to Stan Barber.
- X
- X If possible, send in patches such that the patch program will apply them.
- X Unified or regular context diffs are the best, then normal diffs. Don't
- X send ed scripts--I've probably changed my copy since the version you have.
- X
- X Watch for trn patches in news.software.readers. Patches will always be
- X in the unified context diff format, for application by the patch program.
- X If you don't have a patch program that handles unified context diffs,
- X you'll probably want to get one (such as patch version 12u4). Otherwise,
- X you can use the (included) filter 'unipatch', which can be generated with
- X the command 'make unipatch'. To apply patches, use the command:
- X
- X unipatch <patchfile | patch -p
- X
- X12) If you are going to hack on trn, please refer to rn's HACKERSGUIDE first.
- END_OF_FILE
- if test 9176 -ne `wc -c <'README'`; then
- echo shar: \"'README'\" unpacked with wrong size!
- fi
- # end of 'README'
- fi
- if test -f 'addng.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'addng.h'\"
- else
- echo shar: Extracting \"'addng.h'\" \(989 characters\)
- sed "s/^X//" >'addng.h' <<'END_OF_FILE'
- X/* $Id: addng.h,v 4.4 1991/09/09 20:18:23 sob Exp sob $
- X *
- X * $Log: addng.h,v $
- X * Revision 4.4 1991/09/09 20:18:23 sob
- X * release 4.4
- X *
- X *
- X *
- X */
- X/* This software is Copyright 1991 by Stan Barber.
- X *
- X * Permission is hereby granted to copy, reproduce, redistribute or otherwise
- X * use this software as long as: there is no monetary profit gained
- X * specifically from the use or reproduction of this software, it is not
- X * sold, rented, traded or otherwise marketed, and this copyright notice is
- X * included prominently in any copy made.
- X *
- X * The author make no claims as to the fitness or correctness of this software
- X * for any use whatsoever, and it is provided as is. Any use of this software
- X * is at the user's own risk.
- X */
- X
- void addng_init ANSI((void));
- X#ifdef FINDNEWNG
- X bool newlist ANSI((bool_int,bool_int));
- X# ifdef ACTIVE_TIMES
- X bool find_new_groups ANSI((void));
- X# else
- X long birthof ANSI((char *,ART_NUM));
- X# endif
- X bool scanactive ANSI((void));
- X#endif
- END_OF_FILE
- if test 989 -ne `wc -c <'addng.h'`; then
- echo shar: \"'addng.h'\" unpacked with wrong size!
- fi
- # end of 'addng.h'
- fi
- if test -f 'art.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'art.h'\"
- else
- echo shar: Extracting \"'art.h'\" \(963 characters\)
- sed "s/^X//" >'art.h' <<'END_OF_FILE'
- X/* $Id: art.h,v 4.4 1991/09/09 20:18:23 sob Exp sob $
- X *
- X * $Log: art.h,v $
- X * Revision 4.4 1991/09/09 20:18:23 sob
- X * release 4.4
- X *
- X *
- X *
- X */
- X/* This software is Copyright 1991 by Stan Barber.
- X *
- X * Permission is hereby granted to copy, reproduce, redistribute or otherwise
- X * use this software as long as: there is no monetary profit gained
- X * specifically from the use or reproduction of this software, it is not
- X * sold, rented, traded or otherwise marketed, and this copyright notice is
- X * included prominently in any copy made.
- X *
- X * The author make no claims as to the fitness or correctness of this software
- X * for any use whatsoever, and it is provided as is. Any use of this software
- X * is at the user's own risk.
- X */
- X
- X/* do_article() return values */
- X
- X#define DA_NORM 0
- X#define DA_RAISE 1
- X#define DA_CLEAN 2
- X#define DA_TOEND 3
- X
- void art_init ANSI((void));
- int do_article ANSI((void));
- int page_switch ANSI((void));
- bool innermore ANSI((void));
- END_OF_FILE
- if test 963 -ne `wc -c <'art.h'`; then
- echo shar: \"'art.h'\" unpacked with wrong size!
- fi
- # end of 'art.h'
- fi
- if test -f 'artio.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'artio.h'\"
- else
- echo shar: Extracting \"'artio.h'\" \(1662 characters\)
- sed "s/^X//" >'artio.h' <<'END_OF_FILE'
- X/* $Id: artio.h,v 4.4 1991/09/09 20:18:23 sob Exp sob $
- X *
- X * $Log: artio.h,v $
- X * Revision 4.4 1991/09/09 20:18:23 sob
- X * release 4.4
- X *
- X *
- X *
- X */
- X/* This software is Copyright 1991 by Stan Barber.
- X *
- X * Permission is hereby granted to copy, reproduce, redistribute or otherwise
- X * use this software as long as: there is no monetary profit gained
- X * specifically from the use or reproduction of this software, it is not
- X * sold, rented, traded or otherwise marketed, and this copyright notice is
- X * included prominently in any copy made.
- X *
- X * The author make no claims as to the fitness or correctness of this software
- X * for any use whatsoever, and it is provided as is. Any use of this software
- X * is at the user's own risk.
- X */
- X
- XEXT ART_POS artpos INIT(0); /* byte position in article file */
- X
- XEXT ART_LINE artline INIT(0); /* current line number in article file */
- XEXT FILE *artfp INIT(Nullfp); /* current article file pointer */
- XEXT ART_NUM openart INIT(0); /* what is the currently open article number? */
- X#ifdef LINKART
- X EXT char *linkartname INIT(nullstr);/* real name of article for Eunice */
- X#endif
- X#ifdef SERVER
- XEXT ART_PART openpart INIT(0); /* how much of that article do we have? */
- XFILE *nntpopen ANSI((ART_NUM,ART_PART));
- X /* get an article unless already retrieved */
- void nntpclose ANSI((void));
- X/* MUST be in increasing order of completeness! */
- X#define GET_STATUS 1 /* test for existence only */
- X#define GET_HEADER 2 /* if only header items are desired */
- X#define GET_ARTICLE 3 /* retreive full article */
- X#endif
- X
- void artio_init ANSI((void));
- XFILE *artopen ANSI((ART_NUM)); /* open an article unless already opened */
- END_OF_FILE
- if test 1662 -ne `wc -c <'artio.h'`; then
- echo shar: \"'artio.h'\" unpacked with wrong size!
- fi
- # end of 'artio.h'
- fi
- if test -f 'artsrch.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'artsrch.h'\"
- else
- echo shar: Extracting \"'artsrch.h'\" \(1608 characters\)
- sed "s/^X//" >'artsrch.h' <<'END_OF_FILE'
- X/* $Id: artsrch.h,v 4.4 1991/09/09 20:18:23 sob Exp sob $
- X *
- X * $Log: artsrch.h,v $
- X * Revision 4.4 1991/09/09 20:18:23 sob
- X * release 4.4
- X *
- X *
- X *
- X */
- X/* This software is Copyright 1991 by Stan Barber.
- X *
- X * Permission is hereby granted to copy, reproduce, redistribute or otherwise
- X * use this software as long as: there is no monetary profit gained
- X * specifically from the use or reproduction of this software, it is not
- X * sold, rented, traded or otherwise marketed, and this copyright notice is
- X * included prominently in any copy made.
- X *
- X * The author make no claims as to the fitness or correctness of this software
- X * for any use whatsoever, and it is provided as is. Any use of this software
- X * is at the user's own risk.
- X */
- X
- X#ifndef NBRA
- X#include "search.h"
- X#endif
- X
- X#ifdef ARTSEARCH
- X
- X#define SRCH_ABORT 0
- X#define SRCH_INTR 1
- X#define SRCH_FOUND 2
- X#define SRCH_NOTFOUND 3
- X#define SRCH_DONE 4
- X#define SRCH_SUBJDONE 5
- X#define SRCH_ERROR 6
- X#endif
- X
- XEXT char *lastpat INIT(nullstr); /* last search pattern */
- X#ifdef ARTSEARCH
- X EXT COMPEX sub_compex; /* last compiled subject search */
- X EXT COMPEX art_compex; /* last compiled normal search */
- X# ifdef CONDSUB
- X EXT COMPEX *bra_compex INIT(&(art_compex));
- X /* current compex with brackets */
- X# endif
- X EXT char art_howmuch; /* search just the subjects */
- X EXT bool art_doread; /* search read articles? */
- X#endif
- X
- void artsrch_init ANSI((void));
- X#ifdef ARTSEARCH
- X int art_search ANSI((char *, int, int));
- X bool wanted ANSI((COMPEX *, ART_NUM, char_int));
- X /* return TRUE if current article matches pattern */
- X#endif
- END_OF_FILE
- if test 1608 -ne `wc -c <'artsrch.h'`; then
- echo shar: \"'artsrch.h'\" unpacked with wrong size!
- fi
- # end of 'artsrch.h'
- fi
- if test -f 'artstate.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'artstate.h'\"
- else
- echo shar: Extracting \"'artstate.h'\" \(1512 characters\)
- sed "s/^X//" >'artstate.h' <<'END_OF_FILE'
- X/* $Id: artstate.h,v 4.4 1991/09/09 20:18:23 sob Exp sob $
- X *
- X * $Log: artstate.h,v $
- X * Revision 4.4 1991/09/09 20:18:23 sob
- X * release 4.4
- X *
- X *
- X *
- X */
- X/* This software is Copyright 1991 by Stan Barber.
- X *
- X * Permission is hereby granted to copy, reproduce, redistribute or otherwise
- X * use this software as long as: there is no monetary profit gained
- X * specifically from the use or reproduction of this software, it is not
- X * sold, rented, traded or otherwise marketed, and this copyright notice is
- X * included prominently in any copy made.
- X *
- X * The author make no claims as to the fitness or correctness of this software
- X * for any use whatsoever, and it is provided as is. Any use of this software
- X * is at the user's own risk.
- X */
- X
- XEXT bool reread INIT(FALSE); /* consider current art temporarily */
- X /* unread? */
- XEXT bool do_fseek INIT(FALSE); /* should we back up in article file? */
- X
- XEXT bool oldsubject INIT(FALSE); /* not 1st art in subject thread */
- XEXT ART_LINE topline INIT(-1); /* top line of current screen */
- XEXT bool do_hiding INIT(TRUE); /* hide header lines with -h? */
- X#ifdef ROTATION
- XEXT bool rotate INIT(FALSE); /* has rotation been requested? */
- X#endif
- XEXT char *prompt; /* pointer to current prompt */
- X
- XEXT char *firstline INIT(Nullch); /* special first line? */
- X#ifdef CUSTOMLINES
- XEXT char *hideline INIT(Nullch); /* custom line hiding? */
- XEXT char *pagestop INIT(Nullch); /* custom page terminator? */
- XEXT COMPEX hide_compex;
- XEXT COMPEX page_compex;
- X#endif
- END_OF_FILE
- if test 1512 -ne `wc -c <'artstate.h'`; then
- echo shar: \"'artstate.h'\" unpacked with wrong size!
- fi
- # end of 'artstate.h'
- fi
- if test -f 'autosub.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'autosub.c'\"
- else
- echo shar: Extracting \"'autosub.c'\" \(1964 characters\)
- sed "s/^X//" >'autosub.c' <<'END_OF_FILE'
- X/*
- X * $Id: autosub.c,v 4.4 1991/09/09 20:18:23 sob Exp sob $
- X *
- X * $Log: autosub.c,v $
- X * Revision 4.4 1991/09/09 20:18:23 sob
- X * release 4.4
- X *
- X *
- X *
- X */
- X/* This software is Copyright 1991 by Stan Barber.
- X *
- X * Permission is hereby granted to copy, reproduce, redistribute or otherwise
- X * use this software as long as: there is no monetary profit gained
- X * specifically from the use or reproduction of this software, it is not
- X * sold, rented, traded or otherwise marketed, and this copyright notice is
- X * included prominently in any copy made.
- X *
- X * The author make no claims as to the fitness or correctness of this software
- X * for any use whatsoever, and it is provided as is. Any use of this software
- X * is at the user's own risk.
- X */
- X
- X#include "EXTERN.h"
- X#include "common.h"
- X#include "search.h"
- X#include "ngsrch.h"
- X#include "util.h"
- X#include "INTERN.h"
- X#include "autosub.h"
- X
- X/* Consider the newsgroup specified, and return: */
- X/* : if we should autosubscribe to it */
- X/* ! if we should autounsubscribe to it */
- X/* \0 if we should ask the user. */
- int
- auto_subscribe(ng)
- char *ng;
- X{
- X char *s;
- X
- X if((s = getval("AUTOSUBSCRIBE", (char *)NULL))
- X && matchlist(s, ng)) return ':';
- X if((s = getval("AUTOUNSUBSCRIBE", (char *)NULL))
- X && matchlist(s, ng)) return '!';
- X return 0;
- X}
- X
- bool
- matchlist(patlist, s)
- char *patlist;
- char *s;
- X{
- X COMPEX ilcompex;
- X char *p;
- X char *err;
- X bool result;
- X bool tmpresult;
- X
- X result = FALSE;
- X init_compex(&ilcompex);
- X while(patlist && *patlist) {
- X
- X if(*patlist == '!') {
- X patlist++;
- X tmpresult = FALSE;
- X } else tmpresult = TRUE;
- X
- X if(p = index(patlist, ',')) *p = '\0';
- X /* compile regular expression */
- X err = ng_comp(&ilcompex,patlist,TRUE,TRUE);
- X if(p) *p++ = ',';
- X
- X if(err != Nullch) {
- X printf("\n%s\n", err) FLUSH;
- X finalize(1);
- X }
- X
- X if (execute(&ilcompex,s) != Nullch)
- X result = tmpresult;
- X patlist = p;
- X }
- X free_compex(&ilcompex);
- X return result;
- X}
- END_OF_FILE
- if test 1964 -ne `wc -c <'autosub.c'`; then
- echo shar: \"'autosub.c'\" unpacked with wrong size!
- fi
- # end of 'autosub.c'
- fi
- if test -f 'autosub.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'autosub.h'\"
- else
- echo shar: Extracting \"'autosub.h'\" \(829 characters\)
- sed "s/^X//" >'autosub.h' <<'END_OF_FILE'
- X/*
- X * $Id: autosub.h,v 4.4 1991/09/09 20:18:23 sob Exp sob $
- X *
- X * $Log: autosub.h,v $
- X * Revision 4.4 1991/09/09 20:18:23 sob
- X * release 4.4
- X *
- X *
- X *
- X */
- X/* This software is Copyright 1991 by Stan Barber.
- X *
- X * Permission is hereby granted to copy, reproduce, redistribute or otherwise
- X * use this software as long as: there is no monetary profit gained
- X * specifically from the use or reproduction of this software, it is not
- X * sold, rented, traded or otherwise marketed, and this copyright notice is
- X * included prominently in any copy made.
- X *
- X * The author make no claims as to the fitness or correctness of this software
- X * for any use whatsoever, and it is provided as is. Any use of this software
- X * is at the user's own risk.
- X */
- X
- XEXT int autosubscribe ANSI((char *));
- XEXT bool matchlist ANSI((char *, char *));
- END_OF_FILE
- if test 829 -ne `wc -c <'autosub.h'`; then
- echo shar: \"'autosub.h'\" unpacked with wrong size!
- fi
- # end of 'autosub.h'
- fi
- if test -f 'backpage.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'backpage.h'\"
- else
- echo shar: Extracting \"'backpage.h'\" \(1133 characters\)
- sed "s/^X//" >'backpage.h' <<'END_OF_FILE'
- X/* $Id: backpage.h,v 4.4 1991/09/09 20:18:23 sob Exp sob $
- X *
- X * $Log: backpage.h,v $
- X * Revision 4.4 1991/09/09 20:18:23 sob
- X * release 4.4
- X *
- X *
- X *
- X */
- X/* This software is Copyright 1991 by Stan Barber.
- X *
- X * Permission is hereby granted to copy, reproduce, redistribute or otherwise
- X * use this software as long as: there is no monetary profit gained
- X * specifically from the use or reproduction of this software, it is not
- X * sold, rented, traded or otherwise marketed, and this copyright notice is
- X * included prominently in any copy made.
- X *
- X * The author make no claims as to the fitness or correctness of this software
- X * for any use whatsoever, and it is provided as is. Any use of this software
- X * is at the user's own risk.
- X */
- X
- X/* things for doing the 'back page' command */
- X
- XEXT int varyfd INIT(0); /* virtual array file for storing */
- X /* file offsets */
- XEXT ART_POS varybuf[VARYSIZE]; /* current window onto virtual array */
- X
- XEXT long oldoffset INIT(-1); /* offset to block currently in window */
- X
- void backpage_init ANSI((void));
- ART_POS vrdary ANSI((ART_LINE));
- void vwtary ANSI((ART_LINE,ART_POS));
- END_OF_FILE
- if test 1133 -ne `wc -c <'backpage.h'`; then
- echo shar: \"'backpage.h'\" unpacked with wrong size!
- fi
- # end of 'backpage.h'
- fi
- if test -f 'cheat.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'cheat.h'\"
- else
- echo shar: Extracting \"'cheat.h'\" \(1051 characters\)
- sed "s/^X//" >'cheat.h' <<'END_OF_FILE'
- X/* $Id: cheat.h,v 4.4 1991/09/09 20:18:23 sob Exp sob $
- X *
- X * $Log: cheat.h,v $
- X * Revision 4.4 1991/09/09 20:18:23 sob
- X * release 4.4
- X *
- X *
- X */
- X/* This software is Copyright 1991 by Stan Barber.
- X *
- X * Permission is hereby granted to copy, reproduce, redistribute or otherwise
- X * use this software as long as: there is no monetary profit gained
- X * specifically from the use or reproduction of this software, it is not
- X * sold, rented, traded or otherwise marketed, and this copyright notice is
- X * included prominently in any copy made.
- X *
- X * The author make no claims as to the fitness or correctness of this software
- X * for any use whatsoever, and it is provided as is. Any use of this software
- X * is at the user's own risk.
- X */
- X
- X#ifdef ARTSEARCH
- XEXT ART_NUM srchahead INIT(0); /* are we in subject scan mode? */
- X /* (if so, contains art # found or -1) */
- X#endif
- X
- X#ifdef PENDING
- X# ifdef CACHESUBJ
- X EXT ART_NUM subj_to_get;
- X# endif
- X#endif
- X
- void cheat_init ANSI((void));
- void look_ahead ANSI((void));
- void collect_subjects ANSI((void));
- END_OF_FILE
- if test 1051 -ne `wc -c <'cheat.h'`; then
- echo shar: \"'cheat.h'\" unpacked with wrong size!
- fi
- # end of 'cheat.h'
- fi
- if test -f 'decode.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'decode.c'\"
- else
- echo shar: Extracting \"'decode.c'\" \(471 characters\)
- sed "s/^X//" >'decode.c' <<'END_OF_FILE'
- X/* $Id: decode.c,v 4.4.3.1 1991/11/22 04:12:25 davison Trn $
- X *
- X * $Log: decode.c,v $
- X * Revision 4.4.3.1 1991/11/22 04:12:25 davison
- X * Trn Release 2.0
- X *
- X */
- X
- X#include "EXTERN.h"
- X#include "common.h"
- X#include "INTERN.h"
- X#include "decode.h"
- X
- void
- decode_init()
- X{
- X unship_init();
- X}
- X
- void
- decode_end()
- X{
- X if (decode_fp != Nullfp) {
- X fclose(decode_fp);
- X decode_fp = Nullfp;
- X printf("\n%s INCOMPLETE -- removed.\n", decode_dest) FLUSH;
- X unlink(decode_dest);
- X }
- X}
- END_OF_FILE
- if test 471 -ne `wc -c <'decode.c'`; then
- echo shar: \"'decode.c'\" unpacked with wrong size!
- fi
- # end of 'decode.c'
- fi
- if test -f 'decode.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'decode.h'\"
- else
- echo shar: Extracting \"'decode.h'\" \(1090 characters\)
- sed "s/^X//" >'decode.h' <<'END_OF_FILE'
- X/* $Id: decode.h,v 4.4.3.1 1991/11/22 04:12:25 davison Trn $
- X *
- X * $Log: decode.h,v $
- X * Revision 4.4 1991/09/09 20:27:37 sob
- X * release 4.4
- X *
- X *
- X *
- X */
- X
- X/* This software is Copyright 1991 by Stan Barber.
- X *
- X * Permission is hereby granted to copy, reproduce, redistribute or otherwise
- X * use this software as long as: there is no monetary profit gained
- X * specifically from the use or reproduction of this software, it is not
- X * sold, rented, traded or otherwise marketed, and this copyright notice is
- X * included prominently in any copy made.
- X *
- X * The author make no claims as to the fitness or correctness of this software
- X * for any use whatsoever, and it is provided as is. Any use of this software
- X * is at the user's own risk.
- X */
- XEXT FILE *decode_fp INIT(NULL);
- XEXT char decode_fname[MAXFILENAME];
- XEXT char decode_dest[MAXFILENAME];
- XEXT int decode_type;
- X
- void decode_init ANSI((void));
- void decode_end ANSI((void));
- X
- void uud_start ANSI((void));
- int uudecode ANSI((FILE *));
- X
- void unship_init ANSI((void));
- int unship ANSI((FILE *));
- X
- X#define UUDECODE 0
- X#define UNSHIP 1
- END_OF_FILE
- if test 1090 -ne `wc -c <'decode.h'`; then
- echo shar: \"'decode.h'\" unpacked with wrong size!
- fi
- # end of 'decode.h'
- fi
- if test -f 'final.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'final.h'\"
- else
- echo shar: Extracting \"'final.h'\" \(1428 characters\)
- sed "s/^X//" >'final.h' <<'END_OF_FILE'
- X/* $Id: final.h,v 4.4 1991/09/09 20:18:23 sob Exp sob $
- X *
- X * $Log: final.h,v $
- X * Revision 4.4 1991/09/09 20:18:23 sob
- X * release 4.4
- X *
- X *
- X *
- X */
- X/* This software is Copyright 1991 by Stan Barber.
- X *
- X * Permission is hereby granted to copy, reproduce, redistribute or otherwise
- X * use this software as long as: there is no monetary profit gained
- X * specifically from the use or reproduction of this software, it is not
- X * sold, rented, traded or otherwise marketed, and this copyright notice is
- X * included prominently in any copy made.
- X *
- X * The author make no claims as to the fitness or correctness of this software
- X * for any use whatsoever, and it is provided as is. Any use of this software
- X * is at the user's own risk.
- X */
- X
- X/* cleanup status for fast exits */
- X
- XEXT bool panic INIT(FALSE); /* we got hung up or something-- */
- X /* so leave tty alone */
- XEXT bool rc_changed INIT(FALSE); /* need we rewrite .newsrc? */
- XEXT bool doing_ng INIT(FALSE); /* do we need to reconstitute */
- X /* current rc line? */
- X
- XEXT char int_count INIT(0); /* how many interrupts we've had */
- X
- XEXT bool clear_on_stop INIT(FALSE); /* set when handling the stop signal */
- X /* would leave the screen a mess */
- X
- X/* signal catching routines */
- X
- SIGRET int_catcher ANSI((void));
- SIGRET sig_catcher ANSI((int));
- X#ifdef SIGTSTP
- X SIGRET stop_catcher ANSI((int));
- X#endif
- X
- void final_init ANSI((void));
- void finalize ANSI((int));
- END_OF_FILE
- if test 1428 -ne `wc -c <'final.h'`; then
- echo shar: \"'final.h'\" unpacked with wrong size!
- fi
- # end of 'final.h'
- fi
- if test -f 'help.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'help.h'\"
- else
- echo shar: Extracting \"'help.h'\" \(962 characters\)
- sed "s/^X//" >'help.h' <<'END_OF_FILE'
- X/* $Id: help.h,v 4.4 1991/09/09 20:18:23 sob Exp sob $
- X *
- X * $Log: help.h,v $
- X * Revision 4.4 1991/09/09 20:18:23 sob
- X * release 4.4
- X *
- X *
- X *
- X */
- X/* This software is Copyright 1991 by Stan Barber.
- X *
- X * Permission is hereby granted to copy, reproduce, redistribute or otherwise
- X * use this software as long as: there is no monetary profit gained
- X * specifically from the use or reproduction of this software, it is not
- X * sold, rented, traded or otherwise marketed, and this copyright notice is
- X * included prominently in any copy made.
- X *
- X * The author make no claims as to the fitness or correctness of this software
- X * for any use whatsoever, and it is provided as is. Any use of this software
- X * is at the user's own risk.
- X */
- X
- void help_init ANSI((void));
- int help_ng ANSI((void));
- int help_art ANSI((void));
- int help_page ANSI((void));
- X#ifdef ESCSUBS
- X int help_subs ANSI((void));
- X#endif
- X#ifdef USETHREADS
- X int help_select ANSI((void));
- X#endif
- END_OF_FILE
- if test 962 -ne `wc -c <'help.h'`; then
- echo shar: \"'help.h'\" unpacked with wrong size!
- fi
- # end of 'help.h'
- fi
- if test -f 'init.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'init.h'\"
- else
- echo shar: Extracting \"'init.h'\" \(875 characters\)
- sed "s/^X//" >'init.h' <<'END_OF_FILE'
- X/* $Id: init.h,v 4.4 1991/09/09 20:18:23 sob Exp sob $
- X *
- X * $Log: init.h,v $
- X * Revision 4.4 1991/09/09 20:18:23 sob
- X * release 4.4
- X *
- X *
- X *
- X */
- X/* This software is Copyright 1991 by Stan Barber.
- X *
- X * Permission is hereby granted to copy, reproduce, redistribute or otherwise
- X * use this software as long as: there is no monetary profit gained
- X * specifically from the use or reproduction of this software, it is not
- X * sold, rented, traded or otherwise marketed, and this copyright notice is
- X * included prominently in any copy made.
- X *
- X * The author make no claims as to the fitness or correctness of this software
- X * for any use whatsoever, and it is provided as is. Any use of this software
- X * is at the user's own risk.
- X */
- X
- XEXT char *lockname INIT(nullstr);
- X
- bool initialize ANSI((int,char **));
- void lock_check ANSI((void));
- void newsnews_check ANSI((void));
- END_OF_FILE
- if test 875 -ne `wc -c <'init.h'`; then
- echo shar: \"'init.h'\" unpacked with wrong size!
- fi
- # end of 'init.h'
- fi
- if test -f 'intrp.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'intrp.h'\"
- else
- echo shar: Extracting \"'intrp.h'\" \(1569 characters\)
- sed "s/^X//" >'intrp.h' <<'END_OF_FILE'
- X/* $Id: intrp.h,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
- X *
- X * $Log: intrp.h,v $
- X * Revision 4.4.2.1 1991/12/01 18:05:42 sob
- X * Patchlevel 2 changes
- X *
- X * Revision 4.4 1991/09/09 20:18:23 sob
- X * release 4.4
- X *
- X *
- X *
- X */
- X/* This software is Copyright 1991 by Stan Barber.
- X *
- X * Permission is hereby granted to copy, reproduce, redistribute or otherwise
- X * use this software as long as: there is no monetary profit gained
- X * specifically from the use or reproduction of this software, it is not
- X * sold, rented, traded or otherwise marketed, and this copyright notice is
- X * included prominently in any copy made.
- X *
- X * The author make no claims as to the fitness or correctness of this software
- X * for any use whatsoever, and it is provided as is. Any use of this software
- X * is at the user's own risk.
- X */
- X
- XEXT char *lib INIT(Nullch); /* news library */
- XEXT char *rnlib INIT(Nullch); /* private news program library */
- XEXT char *origdir INIT(Nullch); /* cwd when rn invoked */
- XEXT char *homedir INIT(Nullch); /* login directory */
- XEXT char *dotdir INIT(Nullch); /* where . files go */
- XEXT char *logname INIT(Nullch); /* login id */
- XEXT char *sitename INIT(Nullch); /* host name */
- XEXT int perform_cnt;
- X
- X#ifdef NEWSADMIN
- X EXT char newsadmin[] INIT(NEWSADMIN);/* news administrator */
- X EXT int newsuid INIT(0);
- X#endif
- X
- void intrp_init ANSI((char *));
- char *filexp ANSI((char *));
- char *dointerp ANSI((char *,int,char *,char *));
- void interp ANSI((char *,int,char *));
- void refscpy ANSI((char *,int,char *));
- char *getrealname ANSI((long));
- END_OF_FILE
- if test 1569 -ne `wc -c <'intrp.h'`; then
- echo shar: \"'intrp.h'\" unpacked with wrong size!
- fi
- # end of 'intrp.h'
- fi
- if test -f 'kfile.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'kfile.h'\"
- else
- echo shar: Extracting \"'kfile.h'\" \(1202 characters\)
- sed "s/^X//" >'kfile.h' <<'END_OF_FILE'
- X/* $Id: kfile.h,v 4.4 1991/09/09 20:18:23 sob Exp sob $
- X *
- X * $Log: kfile.h,v $
- X * Revision 4.4 1991/09/09 20:18:23 sob
- X * release 4.4
- X *
- X *
- X *
- X */
- X/* This software is Copyright 1991 by Stan Barber.
- X *
- X * Permission is hereby granted to copy, reproduce, redistribute or otherwise
- X * use this software as long as: there is no monetary profit gained
- X * specifically from the use or reproduction of this software, it is not
- X * sold, rented, traded or otherwise marketed, and this copyright notice is
- X * included prominently in any copy made.
- X *
- X * The author make no claims as to the fitness or correctness of this software
- X * for any use whatsoever, and it is provided as is. Any use of this software
- X * is at the user's own risk.
- X */
- X
- X#define KF_GLOBAL 0
- X#define KF_LOCAL 1
- X
- X#ifdef KILLFILES
- XEXT FILE *globkfp INIT(Nullfp); /* global article killer file */
- XEXT FILE *localkfp INIT(Nullfp); /* local (for this newsgroup) */
- X /* article killer file */
- X#endif
- X
- void kfile_init ANSI((void));
- int do_kfile ANSI((FILE *,int));
- void kill_unwanted ANSI((ART_NUM,char *,int));
- int edit_kfile ANSI((void));
- void open_kfile ANSI((int));
- void kf_append ANSI((char *));
- void setthru ANSI((ART_NUM));
- END_OF_FILE
- if test 1202 -ne `wc -c <'kfile.h'`; then
- echo shar: \"'kfile.h'\" unpacked with wrong size!
- fi
- # end of 'kfile.h'
- fi
- if test -f 'last.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'last.h'\"
- else
- echo shar: Extracting \"'last.h'\" \(1175 characters\)
- sed "s/^X//" >'last.h' <<'END_OF_FILE'
- X/* $Id: last.h,v 4.4 1991/09/09 20:23:31 sob Exp sob $
- X *
- X * $Log: last.h,v $
- X * Revision 4.4 1991/09/09 20:23:31 sob
- X * release 4.4
- X *
- X *
- X *
- X */
- X/* This software is Copyright 1991 by Stan Barber.
- X *
- X * Permission is hereby granted to copy, reproduce, redistribute or otherwise
- X * use this software as long as: there is no monetary profit gained
- X * specifically from the use or reproduction of this software, it is not
- X * sold, rented, traded or otherwise marketed, and this copyright notice is
- X * included prominently in any copy made.
- X *
- X * The author make no claims as to the fitness or correctness of this software
- X * for any use whatsoever, and it is provided as is. Any use of this software
- X * is at the user's own risk.
- X */
- X
- XEXT char *lastngname INIT(Nullch); /* last newsgroup read, from .rnlast file */
- XEXT long lasttime INIT(0); /* time last rn was started up */
- XEXT long lastactsiz INIT(0); /* size of active file when rn last started up */
- XEXT long lastnewtime INIT(0); /* time last new group was found */
- XEXT long lastnewsize INIT(0); /* size of active.times file when rn last started up */
- X
- void last_init ANSI((char *));
- void writelast ANSI((void));
- END_OF_FILE
- if test 1175 -ne `wc -c <'last.h'`; then
- echo shar: \"'last.h'\" unpacked with wrong size!
- fi
- # end of 'last.h'
- fi
- if test -f 'makedir.SH' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'makedir.SH'\"
- else
- echo shar: Extracting \"'makedir.SH'\" \(1644 characters\)
- sed "s/^X//" >'makedir.SH' <<'END_OF_FILE'
- case $CONFIG in
- X '') . ./config.sh ;;
- esac
- echo "Extracting makedir (with variable substitutions)"
- X$spitshell >makedir <<!GROK!THIS!
- X$startsh
- X# $Id: makedir.SH,v 4.4 1991/09/09 20:23:31 sob Exp sob $
- X#
- X# $Log: makedir.SH,v $
- X# Revision 4.4 1991/09/09 20:23:31 sob
- X# release 4.4
- X#
- X#
- X#
- X# This software is Copyright 1991 by Stan Barber.
- X#
- X# Permission is hereby granted to copy, reproduce, redistribute or otherwise
- X# use this software as long as: there is no monetary profit gained
- X# specifically from the use or reproduction or this software, it is not
- X# sold, rented, traded or otherwise marketed, and this copyright notice is
- X# included prominently in any copy made.
- X#
- X# The author make no claims as to the fitness or correctness of this software
- X# for any use whatsoever, and it is provided as is. Any use of this software
- X# is at the user's own risk.
- X
- export PATH || (echo "OOPS, this isn't sh. Desperation time. I will feed myself to sh."; sh \$0; kill \$\$)
- X
- case \$# in
- X 0)
- X $echo "makedir pathname filenameflag"
- X exit 1
- X ;;
- esac
- X
- X: guarantee one slash before 1st component
- case \$1 in
- X /*) ;;
- X *) set ./\$1 \$2 ;;
- esac
- X
- X: strip last component if it is to be a filename
- case X\$2 in
- X X1) set \`$echo \$1 | $sed 's:\(.*\)/[^/]*\$:\1:'\` ;;
- X *) set \$1 ;;
- esac
- X
- X: return reasonable status if nothing to be created
- if $test -d "\$1" ; then
- X exit 0
- fi
- X
- list=''
- while true ; do
- X case \$1 in
- X */*)
- X list="\$1 \$list"
- X set \`echo \$1 | $sed 's:\(.*\)/:\1 :'\`
- X ;;
- X *)
- X break
- X ;;
- X esac
- done
- X
- set \$list
- X
- for dir do
- X $mkdir \$dir >/dev/null 2>&1
- done
- X!GROK!THIS!
- X$eunicefix makedir
- chmod 755 makedir
- END_OF_FILE
- if test 1644 -ne `wc -c <'makedir.SH'`; then
- echo shar: \"'makedir.SH'\" unpacked with wrong size!
- fi
- # end of 'makedir.SH'
- fi
- if test -f 'mbox.saver.SH' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'mbox.saver.SH'\"
- else
- echo shar: Extracting \"'mbox.saver.SH'\" \(1846 characters\)
- sed "s/^X//" >'mbox.saver.SH' <<'END_OF_FILE'
- case $CONFIG in
- X '') . ./config.sh ;;
- esac
- echo "Extracting mbox.saver (with variable substitutions)"
- X$spitshell >mbox.saver <<!GROK!THIS!
- X$startsh
- X# $Id: mbox.saver.SH,v 4.4 1991/09/09 20:23:31 sob Exp sob $
- X#
- X# $Log: mbox.saver.SH,v $
- X# Revision 4.4 1991/09/09 20:23:31 sob
- X# release 4.4
- X#
- X#
- X# This software is Copyright 1991 by Stan Barber.
- X#
- X# Permission is hereby granted to copy, reproduce, redistribute or otherwise
- X# use this software as long as: there is no monetary profit gained
- X# specifically from the use or reproduction of this software, it is not
- X# sold, rented, traded or otherwise marketed, and this copyright notice is
- X# included prominently in any copy made.
- X#
- X# The author make no claims as to the fitness or correctness of this software
- X# for any use whatsoever, and it is provided as is. Any use of this software
- X# is at the user's own risk.
- X#
- X# Arguments:
- X# 1 Full name of article (%A)
- X# 2 Public news spool directory (%P)
- X# 3 Directory of current newsgroup (%c)
- X# 4 Article number (%a)
- X# 5 Where in article to start (%B)
- X# 6 Newsgroup name (%C)
- X# 7 Save destination (%b)
- X# 8 First line of message, normally From...
- X#
- export PATH || (echo "OOPS, this isn't sh. Desperation time. I will feed myself to sh."; sh \$0; kill \$\$)
- X
- X!GROK!THIS!
- case $mboxchar in
- X"$CTRLA")
- X $spitshell >>mbox.saver <<!GROK!THIS!
- X( $echo "$CTRLA$CTRLA$CTRLA$CTRLA"
- X if $test "\$5" = 0 -a ! "\$4" = 0 ; then
- X $echo "Article: \$4 of \$6"
- X fi
- X $tail +\$5c \$1
- X $echo ""
- X $echo ""
- X $echo "$CTRLA$CTRLA$CTRLA$CTRLA" ) >> \$7
- X!GROK!THIS!
- X ;;
- X*)
- X $spitshell >>mbox.saver <<!GROK!THIS!
- X ( $echo "\$8"
- X if $test "\$5" = 0 -a ! "\$4" = 0 ; then
- X $echo "Article: \$4 of \$6"
- X fi
- X $tail +\$5c \$1 | $sed "s/^From />From /"
- X $echo ""
- X $echo "" ) >> \$7
- X!GROK!THIS!
- X ;;
- esac
- X$eunicefix mbox.saver
- chmod 755 mbox.saver
- END_OF_FILE
- if test 1846 -ne `wc -c <'mbox.saver.SH'`; then
- echo shar: \"'mbox.saver.SH'\" unpacked with wrong size!
- fi
- # end of 'mbox.saver.SH'
- fi
- if test -f 'mt-lint.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'mt-lint.h'\"
- else
- echo shar: Extracting \"'mt-lint.h'\" \(1452 characters\)
- sed "s/^X//" >'mt-lint.h' <<'END_OF_FILE'
- X/* $Id: mt-lint.h,v 4.4.3.1 1991/11/22 04:12:15 davison Trn $
- X**
- X** $Log: mt-lint.h,v $
- X** Revision 4.4.3.1 1991/11/22 04:12:15 davison
- X** Trn Release 2.0
- X**
- X** Handle brain-dead lints that only have 6 significant-character names.
- X*/
- X
- X#define subject_cnts sucnts
- X#define subject_array suarra
- X#define subject_strings sustri
- X#define subject_str sustr
- X#define author_cnts aucnts
- X#define author_array auarra
- X#define author_root auroot
- X#define author_str austr
- X#define valid_subject vsubje
- X#define valid_author vautho
- X#define valid_message_id vmsgid
- X#define read_authors rautho
- X#define read_articles rartic
- X#define read_ids rids
- X#define read_item ritem
- X#define processed_groups pgroup
- X#define process_articles partic
- X#define expired_articles eartic
- X#define unlink_child uchild
- X#define unlink_root uroot
- X#define free_article fartic
- X#define free_author fautho
- X#define enumerate_articles enarti
- X#define enumerate_thread enthrd
- X#define string_offset soffst
- X#define write_authors wautho
- X#define write_subjects wsubje
- X#define write_roots wroots
- X#define write_articles wartic
- X#define write_thread wthred
- X#define write_ids wids
- X#define write_item witem
- X#define processed_groups pgroup
- X#define timer_off timoff
- X#define timer_first tim1st
- X#define timer_next timnxt
- X#define truncate_len trulen
- X#define article_array artarr
- X
- X#define safemalloc(x) (NULL)
- X#define free(x) (x = NULL)
- X#define safefree(x) (*x = NULL)
- X#define signal(x,y)
- END_OF_FILE
- if test 1452 -ne `wc -c <'mt-lint.h'`; then
- echo shar: \"'mt-lint.h'\" unpacked with wrong size!
- fi
- # end of 'mt-lint.h'
- fi
- if test -f 'mt.check.SH' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'mt.check.SH'\"
- else
- echo shar: Extracting \"'mt.check.SH'\" \(1376 characters\)
- sed "s/^X//" >'mt.check.SH' <<'END_OF_FILE'
- case $CONFIG in
- X '') . ./config.sh ;;
- esac
- echo "Extracting mt.check (with variable substitutions)"
- version=`cat patchlevel`
- X$spitshell >mt.check <<!GROK!THIS!
- X$startsh
- X# $Id: mt.check.SH,v 4.4.3.1 1991/11/22 04:11:10 davison Trn $
- X#
- X# $Log: mt.check.SH,v $
- X# Revision 4.4.3.1 1991/11/22 04:11:10 davison
- X# Trn Release 2.0
- X#
- X# mt.check - daily maintenance for mt.log
- X#
- X# Check mt.log for earth-shattering errors, and mail them to \$gurus if found.
- X# Then move the mt.log file into a week-long history chain.
- X#
- X# Usage: mt.check
- X#
- X
- gurus="$newsadmin"
- tmp="/tmp/mt.c\$\$"
- X
- PATH=/bin:/usr/bin
- export PATH
- X
- umask 002
- X
- trap "rm -f \$tmp ; exit 0" 0 1 2 15
- X
- cd $mtlib
- X
- X$egrep " \\*\\*\$" mt.log >\$tmp
- X
- if test -s \$tmp ; then
- X (cat <<EOT
- To: \$gurus
- Subject: mthreads error!
- X
- The following errors were reported in mt.log. If the error pertains to
- the active file, you should lock down your news system and fix it. If
- it is a thread-releated bug and it persists, please report this fact to
- Wayne Davison (davison@borland.com). Mention version "$version".
- X
- XEOT
- X cat \$tmp) | mail \$gurus
- fi
- X
- test -f mt.log.6 && mv mt.log.6 mt.log.7
- test -f mt.log.5 && mv mt.log.5 mt.log.6
- test -f mt.log.4 && mv mt.log.4 mt.log.5
- test -f mt.log.3 && mv mt.log.3 mt.log.4
- test -f mt.log.2 && mv mt.log.2 mt.log.3
- test -f mt.log && mv mt.log mt.log.2
- touch mt.log
- X
- exit 0
- X!GROK!THIS!
- END_OF_FILE
- if test 1376 -ne `wc -c <'mt.check.SH'`; then
- echo shar: \"'mt.check.SH'\" unpacked with wrong size!
- fi
- # end of 'mt.check.SH'
- fi
- if test -f 'mthreads.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'mthreads.h'\"
- else
- echo shar: Extracting \"'mthreads.h'\" \(1630 characters\)
- sed "s/^X//" >'mthreads.h' <<'END_OF_FILE'
- X/* $Id: mthreads.h,v 4.4.3.1 1991/11/22 04:12:15 davison Trn $
- X**
- X** $Log: mthreads.h,v $
- X** Revision 4.4.3.1 1991/11/22 04:12:15 davison
- X** Trn Release 2.0
- X**
- X*/
- X
- X#ifdef lint
- X#include "mt-lint.h"
- X#endif
- X
- X#if !defined(TMPTHREAD) && defined(SERVERSPOOL)
- X# undef SERVER
- X# undef SPOOL
- X# define SPOOL SERVERSPOOL
- X#endif
- X
- X#define RWBUFSIZ 8192
- X
- X#define PASS_LOCK 1
- X#define DAEMON_LOCK 2
- X
- XEXT char rwbuf[RWBUFSIZ];
- X
- XEXT TOTAL total;
- X
- XEXT int added_articles INIT(0);
- XEXT int expired_articles INIT(0);
- XEXT int added_count;
- XEXT int expired_count;
- XEXT bool extra_expire INIT(FALSE);
- X
- XEXT char *strings INIT(0);
- XEXT WORD *subject_cnts INIT(0);
- XEXT WORD *author_cnts INIT(0);
- XEXT WORD *ids INIT(0);
- X
- XEXT SUBJECT **subject_array;
- XEXT ROOT **root_array;
- XEXT AUTHOR **author_array;
- XEXT ARTICLE **article_array;
- X
- XEXT PACKED_ROOT p_root;
- XEXT PACKED_ARTICLE p_article;
- X
- XEXT ROOT *root_root;
- XEXT AUTHOR *author_root;
- X
- X#ifndef DOINIT
- XEXT DOMAIN unk_domain;
- X#else
- DOMAIN unk_domain = {
- X ".unknown.", NULL, NULL
- X};
- X#endif
- X
- int ngmatch ANSI((char *,char *));
- int onepatmatch ANSI((char *,char *));
- X
- void mt_init ANSI((void));
- long mt_lock ANSI((int, int));
- void mt_unlock ANSI((int));
- void wrap_it_up ANSI((int));
- void log_entry();
- void log_error();
- X
- int read_data ANSI((void));
- int write_data ANSI((char *));
- void dont_read_data ANSI((int));
- X
- void process_articles ANSI((ART_NUM,ART_NUM));
- X
- int open_server ANSI((void));
- char *file_exp ANSI((char *));
- char *savestr ANSI((char *));
- X
- X#ifndef lint
- char *safemalloc ANSI((MEM_SIZE));
- void free();
- void safefree();
- X#endif
- X
- time_t get_date ANSI((char *,time_t,long));
- X
- X#define Nullart Null(ARTICLE*)
- END_OF_FILE
- if test 1630 -ne `wc -c <'mthreads.h'`; then
- echo shar: \"'mthreads.h'\" unpacked with wrong size!
- fi
- # end of 'mthreads.h'
- fi
- if test -f 'ng.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ng.h'\"
- else
- echo shar: Extracting \"'ng.h'\" \(1662 characters\)
- sed "s/^X//" >'ng.h' <<'END_OF_FILE'
- X/* $Id: ng.h,v 4.4 1991/09/09 20:23:31 sob Exp sob $
- X *
- X * $Log: ng.h,v $
- X * Revision 4.4 1991/09/09 20:23:31 sob
- X * release 4.4
- X *
- X *
- X *
- X */
- X/* This software is Copyright 1991 by Stan Barber.
- X *
- X * Permission is hereby granted to copy, reproduce, redistribute or otherwise
- X * use this software as long as: there is no monetary profit gained
- X * specifically from the use or reproduction of this software, it is not
- X * sold, rented, traded or otherwise marketed, and this copyright notice is
- X * included prominently in any copy made.
- X *
- X * The author make no claims as to the fitness or correctness of this software
- X * for any use whatsoever, and it is provided as is. Any use of this software
- X * is at the user's own risk.
- X */
- X
- XEXT ART_NUM art INIT(0); /* current or prospective article # */
- X
- XEXT int checkcount INIT(0); /* how many articles have we read */
- X /* in the current newsgroup since */
- X /* the last checkpoint? */
- XEXT int docheckwhen INIT(20); /* how often to do checkpoint */
- X
- X#ifdef MAILCALL
- XEXT int mailcount INIT(0); /* check for mail when 0 mod 10 */
- X#endif
- XEXT char *mailcall INIT(nullstr);
- X#ifdef SERVER
- XEXT bool isfirstart INIT(TRUE);
- X#endif
- XEXT bool forcelast INIT(FALSE); /* ought we show "End of newsgroup"? */
- XEXT bool forcegrow INIT(FALSE); /* do we want to recalculate size */
- X /* of newsgroup, e.g. after posting? */
- X
- X#define NG_ERROR -1
- X#define NG_NORM 0
- X#define NG_ASK 1
- X#define NG_MINUS 2
- X#define NG_SELPRIOR 3
- X#define NG_SELNEXT 4
- X
- void ng_init ANSI((void));
- int do_newsgroup ANSI((char *));
- int art_switch ANSI((void));
- X#ifdef MAILCALL
- X void setmail ANSI((void));
- X#endif
- void setdfltcmd ANSI((void));
- END_OF_FILE
- if test 1662 -ne `wc -c <'ng.h'`; then
- echo shar: \"'ng.h'\" unpacked with wrong size!
- fi
- # end of 'ng.h'
- fi
- if test -f 'ngdata.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ngdata.h'\"
- else
- echo shar: Extracting \"'ngdata.h'\" \(1575 characters\)
- sed "s/^X//" >'ngdata.h' <<'END_OF_FILE'
- X/* $Id: ngdata.h,v 4.4 1991/09/09 20:23:31 sob Exp sob $
- X *
- X * $Log: ngdata.h,v $
- X * Revision 4.4 1991/09/09 20:23:31 sob
- X * release 4.4
- X *
- X *
- X *
- X */
- X/* This software is Copyright 1991 by Stan Barber.
- X *
- X * Permission is hereby granted to copy, reproduce, redistribute or otherwise
- X * use this software as long as: there is no monetary profit gained
- X * specifically from the use or reproduction of this software, it is not
- X * sold, rented, traded or otherwise marketed, and this copyright notice is
- X * included prominently in any copy made.
- X *
- X * The author make no claims as to the fitness or correctness of this software
- X * for any use whatsoever, and it is provided as is. Any use of this software
- X * is at the user's own risk.
- X */
- X
- XEXT FILE *actfp INIT(Nullfp); /* the active file */
- XEXT bool writesoft INIT(FALSE); /* rewrite the soft pointer file? */
- XEXT int softtries INIT(0), softmisses INIT(0);
- X
- X#ifdef SERVER
- X EXT char active_name[MAXFILENAME];
- X#endif
- X
- X#ifdef CACHEFIRST
- X EXT ART_NUM *abs1st INIT(NULL); /* 1st real article in newsgroup */
- X#else
- X# ifdef MININACT
- X EXT ART_NUM abs1st INIT(0);
- X# endif
- X#endif
- X
- XEXT char *moderated;
- X#ifdef USETHREADS
- XEXT char *tmpthread_group INIT(Nullch);
- XEXT int tmpthread_glen INIT(0);
- XEXT char *tmpthread_file INIT(Nullch);
- XEXT bool ThreadedGroup;
- X#endif
- XEXT long activeitems; /* number of enties in active file */
- void ngdata_init ANSI((void));
- ART_NUM getngsize ANSI((NG_NUM));
- ACT_POS findact ANSI((char *,char *,int,long));
- ART_NUM getabsfirst ANSI((NG_NUM,ART_NUM));
- ART_NUM getngmin ANSI((char *,ART_NUM));
- END_OF_FILE
- if test 1575 -ne `wc -c <'ngdata.h'`; then
- echo shar: \"'ngdata.h'\" unpacked with wrong size!
- fi
- # end of 'ngdata.h'
- fi
- if test -f 'ngsrch.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ngsrch.h'\"
- else
- echo shar: Extracting \"'ngsrch.h'\" \(1145 characters\)
- sed "s/^X//" >'ngsrch.h' <<'END_OF_FILE'
- X/* $Id: ngsrch.h,v 4.4 1991/09/09 20:23:31 sob Exp sob $
- X *
- X * $Log: ngsrch.h,v $
- X * Revision 4.4 1991/09/09 20:23:31 sob
- X * release 4.4
- X *
- X *
- X *
- X */
- X/* This software is Copyright 1991 by Stan Barber.
- X *
- X * Permission is hereby granted to copy, reproduce, redistribute or otherwise
- X * use this software as long as: there is no monetary profit gained
- X * specifically from the use or reproduction of this software, it is not
- X * sold, rented, traded or otherwise marketed, and this copyright notice is
- X * included prominently in any copy made.
- X *
- X * The author make no claims as to the fitness or correctness of this software
- X * for any use whatsoever, and it is provided as is. Any use of this software
- X * is at the user's own risk.
- X */
- X
- X#ifdef NGSEARCH
- X#define NGS_ABORT 0
- X#define NGS_FOUND 1
- X#define NGS_INTR 2
- X#define NGS_NOTFOUND 3
- X#define NGS_ERROR 4
- X
- XEXT bool ng_doread INIT(FALSE); /* search read newsgroups? */
- X#endif
- X
- void ngsrch_init ANSI((void));
- X#ifdef NGSEARCH
- X int ng_search ANSI((char *,int));
- X bool ng_wanted ANSI((void));
- X#endif
- X#ifdef NGSORONLY
- X char *ng_comp ANSI((COMPEX *,char *,bool_int,bool_int));
- X#endif
- END_OF_FILE
- if test 1145 -ne `wc -c <'ngsrch.h'`; then
- echo shar: \"'ngsrch.h'\" unpacked with wrong size!
- fi
- # end of 'ngsrch.h'
- fi
- if test -f 'ngstuff.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ngstuff.h'\"
- else
- echo shar: Extracting \"'ngstuff.h'\" \(1091 characters\)
- sed "s/^X//" >'ngstuff.h' <<'END_OF_FILE'
- X/* $Id: ngstuff.h,v 4.4 1991/09/09 20:23:31 sob Exp sob $
- X *
- X * $Log: ngstuff.h,v $
- X * Revision 4.4 1991/09/09 20:23:31 sob
- X * release 4.4
- X *
- X *
- X *
- X */
- X/* This software is Copyright 1991 by Stan Barber.
- X *
- X * Permission is hereby granted to copy, reproduce, redistribute or otherwise
- X * use this software as long as: there is no monetary profit gained
- X * specifically from the use or reproduction of this software, it is not
- X * sold, rented, traded or otherwise marketed, and this copyright notice is
- X * included prominently in any copy made.
- X *
- X * The author make no claims as to the fitness or correctness of this software
- X * for any use whatsoever, and it is provided as is. Any use of this software
- X * is at the user's own risk.
- X */
- X
- X#define NN_NORM 0
- X#define NN_INP 1
- X#define NN_REREAD 2
- X#define NN_ASK 3
- X
- XEXT bool one_command INIT(FALSE); /* no ':' processing in perform() */
- X
- void ngstuff_init ANSI((void));
- int escapade ANSI((void));
- int switcheroo ANSI((void));
- int numnum ANSI((void));
- int perform ANSI((char *,int));
- X#ifdef USETHREADS
- int use_selected ANSI((void));
- X#endif
- END_OF_FILE
- if test 1091 -ne `wc -c <'ngstuff.h'`; then
- echo shar: \"'ngstuff.h'\" unpacked with wrong size!
- fi
- # end of 'ngstuff.h'
- fi
- if test ! -d 'nntp' ; then
- echo shar: Creating directory \"'nntp'\"
- mkdir 'nntp'
- fi
- if test -f 'nntp/support.patch' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'nntp/support.patch'\"
- else
- echo shar: Extracting \"'nntp/support.patch'\" \(651 characters\)
- sed "s/^X//" >'nntp/support.patch' <<'END_OF_FILE'
- Index: Makefile
- X@@ -3,7 +3,7 @@
- X #
- X
- X-OBJS = mkgrdates.o
- X+OBJS = acttimes.o
- X
- X-SRCS = mkgrdates.c
- X+SRCS = acttimes.c
- X
- X HFILES = ../common/conf.h
- X@@ -15,18 +15,18 @@
- X DESTDIR = /usr/lib/news
- X
- X-all: mkgrdates
- X+all: acttimes
- X
- X-mkgrdates: mkgrdates.o
- X- $(CC) ${CFLAGS} -o mkgrdates mkgrdates.o
- X+acttimes: acttimes.o
- X+ $(CC) ${CFLAGS} -o acttimes acttimes.o
- X
- X-install: mkgrdates
- X- cp mkgrdates ${DESTDIR}/mkgrdates
- X- chmod 755 ${DESTDIR}/mkgrdates
- X+install: acttimes
- X+ cp acttimes ${DESTDIR}/acttimes
- X+ chmod 755 ${DESTDIR}/acttimes
- X
- X lint:
- X- lint mkgrdates.c
- X+ lint acttimes.c
- X
- X clean:
- X- -rm -f *.o mkgrdates
- X+ -rm -f *.o acttimes
- X
- X distrib: clean
- END_OF_FILE
- if test 651 -ne `wc -c <'nntp/support.patch'`; then
- echo shar: \"'nntp/support.patch'\" unpacked with wrong size!
- fi
- # end of 'nntp/support.patch'
- fi
- if test -f 'norm.saver.SH' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'norm.saver.SH'\"
- else
- echo shar: Extracting \"'norm.saver.SH'\" \(1383 characters\)
- sed "s/^X//" >'norm.saver.SH' <<'END_OF_FILE'
- case $CONFIG in
- X '') . ./config.sh ;;
- esac
- echo "Extracting norm.saver (with variable substitutions)"
- X$spitshell >norm.saver <<!GROK!THIS!
- X$startsh
- X# $Id: norm.saver.SH,v 4.4 1991/09/09 20:23:31 sob Exp sob $
- X#
- X# $Log: norm.saver.SH,v $
- X# Revision 4.4 1991/09/09 20:23:31 sob
- X# release 4.4
- X#
- X#
- X# This software is Copyright 1991 by Stan Barber.
- X#
- X# Permission is hereby granted to copy, reproduce, redistribute or otherwise
- X# use this software as long as: there is no monetary profit gained
- X# specifically from the use or reproduction of this software, it is not
- X# sold, rented, traded or otherwise marketed, and this copyright notice is
- X# included prominently in any copy made.
- X#
- X# The author make no claims as to the fitness or correctness of this software
- X# for any use whatsoever, and it is provided as is. Any use of this software
- X# is at the user's own risk.
- X#
- X# Arguments:
- X# 1 Full name of article (%A)
- X# 2 Public news spool directory (%P)
- X# 3 Directory of current newsgroup (%c)
- X# 4 Article number (%a)
- X# 5 Where in article to start (%B)
- X# 6 Newsgroup name (%C)
- X# 7 Save destination (%b)
- X#
- export PATH || (echo "OOPS, this isn't sh. Desperation time. I will feed myself to sh."; sh \$0; kill \$\$)
- X
- X( case "\$5" in
- X 0) $echo "Article \$4 of \$6:" ;;
- X esac
- X $tail +\$5c \$1
- X $echo ""
- X $echo "" ) >> \$7
- X!GROK!THIS!
- X$eunicefix norm.saver
- chmod 755 norm.saver
- END_OF_FILE
- if test 1383 -ne `wc -c <'norm.saver.SH'`; then
- echo shar: \"'norm.saver.SH'\" unpacked with wrong size!
- fi
- # end of 'norm.saver.SH'
- fi
- if test -f 'only.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'only.h'\"
- else
- echo shar: Extracting \"'only.h'\" \(1282 characters\)
- sed "s/^X//" >'only.h' <<'END_OF_FILE'
- X/* $Id: only.h,v 4.4 1991/09/09 20:23:31 sob Exp sob $
- X *
- X * $Log: only.h,v $
- X * Revision 4.4 1991/09/09 20:23:31 sob
- X * release 4.4
- X *
- X *
- X *
- X */
- X/* This software is Copyright 1991 by Stan Barber.
- X *
- X * Permission is hereby granted to copy, reproduce, redistribute or otherwise
- X * use this software as long as: there is no monetary profit gained
- X * specifically from the use or reproduction of this software, it is not
- X * sold, rented, traded or otherwise marketed, and this copyright notice is
- X * included prominently in any copy made.
- X *
- X * The author make no claims as to the fitness or correctness of this software
- X * for any use whatsoever, and it is provided as is. Any use of this software
- X * is at the user's own risk.
- X */
- X
- X#ifndef NBRA
- X#include "search.h"
- X#endif
- X
- X#ifdef ONLY
- X EXT char *ngtodo[NGMAX]; /* restrictions in effect */
- X# ifdef SPEEDOVERMEM
- X EXT COMPEX *compextodo[NGMAX]; /* restrictions in compiled form */
- X# endif
- X#endif
- X
- XEXT int maxngtodo INIT(0); /* 0 => no restrictions */
- X /* >0 => # of entries in ngtodo */
- X
- void only_init ANSI((void));
- bool inlist ANSI((char *)); /* return TRUE if ngname is in command line list */
- X /* or if there was no list */
- void setngtodo ANSI((char *));
- X#ifdef ONLY
- X void end_only ANSI((void));
- X#endif
- END_OF_FILE
- if test 1282 -ne `wc -c <'only.h'`; then
- echo shar: \"'only.h'\" unpacked with wrong size!
- fi
- # end of 'only.h'
- fi
- if test -f 'patchlevel' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'patchlevel'\"
- else
- echo shar: Extracting \"'patchlevel'\" \(9 characters\)
- sed "s/^X//" >'patchlevel' <<'END_OF_FILE'
- trn v2.1
- END_OF_FILE
- if test 9 -ne `wc -c <'patchlevel'`; then
- echo shar: \"'patchlevel'\" unpacked with wrong size!
- fi
- # end of 'patchlevel'
- fi
- if test -f 'rcln.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'rcln.h'\"
- else
- echo shar: Extracting \"'rcln.h'\" \(1132 characters\)
- sed "s/^X//" >'rcln.h' <<'END_OF_FILE'
- X/* $Id: rcln.h,v 4.4 1991/09/09 20:27:37 sob Exp sob $
- X *
- X * $Log: rcln.h,v $
- X * Revision 4.4 1991/09/09 20:27:37 sob
- X * release 4.4
- X *
- X *
- X *
- X */
- X/* This software is Copyright 1991 by Stan Barber.
- X *
- X * Permission is hereby granted to copy, reproduce, redistribute or otherwise
- X * use this software as long as: there is no monetary profit gained
- X * specifically from the use or reproduction of this software, it is not
- X * sold, rented, traded or otherwise marketed, and this copyright notice is
- X * included prominently in any copy made.
- X *
- X * The author make no claims as to the fitness or correctness of this software
- X * for any use whatsoever, and it is provided as is. Any use of this software
- X * is at the user's own risk.
- X */
- X
- X#if defined(DEBUGGING) || defined(USETHREADS)
- XEXT ART_NUM *ngmax INIT(NULL);
- X#endif
- X
- void rcln_init ANSI((void));
- X#ifdef CATCHUP
- X void catch_up ANSI((NG_NUM));
- X#endif
- int addartnum ANSI((ART_NUM,char *));
- X#ifdef MCHASE
- X void subartnum ANSI((ART_NUM,char *));
- X#endif
- void prange ANSI((char *,ART_NUM,ART_NUM));
- void set_toread ANSI((NG_NUM));
- void checkexpired ANSI((NG_NUM,ART_NUM));
- END_OF_FILE
- if test 1132 -ne `wc -c <'rcln.h'`; then
- echo shar: \"'rcln.h'\" unpacked with wrong size!
- fi
- # end of 'rcln.h'
- fi
- if test -f 'respond.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'respond.h'\"
- else
- echo shar: Extracting \"'respond.h'\" \(1328 characters\)
- sed "s/^X//" >'respond.h' <<'END_OF_FILE'
- X/* $Id: respond.h,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
- X *
- X * $Log: respond.h,v $
- X * Revision 4.4.2.1 1991/12/01 18:05:42 sob
- X * Patchlevel 2 changes
- X *
- X * Revision 4.4 1991/09/09 20:27:37 sob
- X * release 4.4
- X *
- X *
- X */
- X/* This software is Copyright 1991 by Stan Barber.
- X *
- X * Permission is hereby granted to copy, reproduce, redistribute or otherwise
- X * use this software as long as: there is no monetary profit gained
- X * specifically from the use or reproduction of this software, it is not
- X * sold, rented, traded or otherwise marketed, and this copyright notice is
- X * included prominently in any copy made.
- X *
- X * The author make no claims as to the fitness or correctness of this software
- X * for any use whatsoever, and it is provided as is. Any use of this software
- X * is at the user's own risk.
- X */
- X
- XEXT char *savedest INIT(Nullch); /* value of %b */
- XEXT char *extractdest INIT(Nullch); /* value of %E */
- XEXT char *extractprog INIT(Nullch); /* value of %e */
- XEXT ART_POS savefrom INIT(0); /* value of %B */
- XEXT char *headname INIT(Nullch);
- X
- X#define SAVE_ABORT 0
- X#define SAVE_DONE 1
- X
- void respond_init ANSI((void));
- int save_article ANSI((void));
- int cancel_article ANSI((void));
- int supersede_article ANSI((void));
- void reply ANSI((void));
- void followup ANSI((void));
- void invoke ANSI((char *,char *));
- END_OF_FILE
- if test 1328 -ne `wc -c <'respond.h'`; then
- echo shar: \"'respond.h'\" unpacked with wrong size!
- fi
- # end of 'respond.h'
- fi
- if test -f 'rn.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'rn.h'\"
- else
- echo shar: Extracting \"'rn.h'\" \(1597 characters\)
- sed "s/^X//" >'rn.h' <<'END_OF_FILE'
- X/* $Id: rn.h,v 4.4 1991/09/09 20:27:37 sob Exp sob $
- X *
- X * $Log: rn.h,v $
- X * Revision 4.4 1991/09/09 20:27:37 sob
- X * release 4.4
- X *
- X *
- X *
- X */
- X/* This software is Copyright 1991 by Stan Barber.
- X *
- X * Permission is hereby granted to copy, reproduce, redistribute or otherwise
- X * use this software as long as: there is no monetary profit gained
- X * specifically from the use or reproduction of this software, it is not
- X * sold, rented, traded or otherwise marketed, and this copyright notice is
- X * included prominently in any copy made.
- X *
- X * The author make no claims as to the fitness or correctness of this software
- X * for any use whatsoever, and it is provided as is. Any use of this software
- X * is at the user's own risk.
- X */
- X
- XEXT char *ngname INIT(Nullch); /* name of current newsgroup */
- XEXT int ngnlen INIT(0); /* current malloced size of ngname */
- XEXT char *ngdir INIT(Nullch); /* same thing in directory name form */
- XEXT int ngdlen INIT(0); /* current malloced size of ngdir */
- X
- XEXT NG_NUM ng INIT(0); /* current newsgroup index into rcline and toread */
- XEXT NG_NUM current_ng INIT(0); /* stable current newsgroup so we can ditz with ng */
- XEXT NG_NUM starthere INIT(0); /* set to the first newsgroup with unread news on startup */
- XEXT char *spool INIT(Nullch); /* public news spool directory */
- X#ifdef USETHREADS
- XEXT char *threaddir INIT(Nullch); /* directory for thread data */
- XEXT char *mtlib INIT(Nullch); /* directory for mthreads files */
- X#endif
- X
- void rn_init ANSI((void));
- void main ANSI((int,char **));
- void set_ngname ANSI((char *));
- char *getngdir ANSI((char *));
- END_OF_FILE
- if test 1597 -ne `wc -c <'rn.h'`; then
- echo shar: \"'rn.h'\" unpacked with wrong size!
- fi
- # end of 'rn.h'
- fi
- if test -f 'rthreads.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'rthreads.h'\"
- else
- echo shar: Extracting \"'rthreads.h'\" \(1591 characters\)
- sed "s/^X//" >'rthreads.h' <<'END_OF_FILE'
- X/* $Id: rthreads.h,v 4.4.3.1 1991/11/22 04:12:18 davison Trn $
- X**
- X** $Log: rthreads.h,v $
- X** Revision 4.4.3.1 1991/11/22 04:12:18 davison
- X** Trn Release 2.0
- X**
- X*/
- X
- XEXT TOTAL total;
- X
- XEXT PACKED_ROOT *p_roots INIT(0);
- XEXT WORD *root_subjects INIT(0);
- XEXT WORD *author_cnts INIT(0);
- XEXT WORD *subject_cnts INIT(0);
- XEXT char **author_ptrs INIT(0);
- XEXT char **subject_ptrs INIT(0);
- XEXT PACKED_ARTICLE *p_articles INIT(0);
- XEXT WORD *root_article_cnts INIT(0);
- XEXT char *selected_roots INIT(0);
- XEXT ART_NUM *saved_selections INIT(0);
- XEXT bool unread_selector INIT(0);
- X
- XEXT PACKED_ARTICLE *p_art INIT(0);
- XEXT PACKED_ARTICLE *curr_p_art INIT(0);
- XEXT PACKED_ARTICLE *recent_p_art INIT(0);
- X
- XEXT int selected_root_cnt INIT(0);
- XEXT ART_NUM selected_count INIT(0);
- XEXT int unthreaded INIT(0);
- XEXT int select_page;
- XEXT bool scan_all_roots;
- XEXT bool output_chase_phrase;
- X
- X#ifndef USETMPTHREAD
- XEXT int tobethreaded INIT(0);
- X#endif
- X
- void thread_init ANSI((void));
- char *safemalloc ANSI((MEM_SIZE));
- int use_data ANSI((bool_int));
- void unuse_data ANSI((bool_int));
- void find_article ANSI((ART_NUM));
- void init_tree ANSI((void));
- void entire_tree ANSI((void));
- int tree_puts ANSI((char *,ART_LINE,int));
- int finish_tree ANSI((ART_LINE));
- void first_art ANSI((void));
- void follow_thread ANSI((char_int));
- void backtrack_thread ANSI((char_int));
- void next_root ANSI((void));
- void prev_root ANSI((void));
- char select_thread ANSI((char_int));
- int count_roots ANSI((bool_int));
- int count_one_root ANSI((int));
- PACKED_ARTICLE *upper_limit ANSI((PACKED_ARTICLE *,bool_int));
- X
- X#define Nullart Null(PACKED_ARTICLE*)
- END_OF_FILE
- if test 1591 -ne `wc -c <'rthreads.h'`; then
- echo shar: \"'rthreads.h'\" unpacked with wrong size!
- fi
- # end of 'rthreads.h'
- fi
- if test -f 'search.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'search.h'\"
- else
- echo shar: Extracting \"'search.h'\" \(1835 characters\)
- sed "s/^X//" >'search.h' <<'END_OF_FILE'
- X/* $Id: search.h,v 4.4 1991/09/09 20:27:37 sob Exp sob $
- X *
- X * $Log: search.h,v $
- X * Revision 4.4 1991/09/09 20:27:37 sob
- X * release 4.4
- X *
- X *
- X *
- X */
- X/* This software is Copyright 1991 by Stan Barber.
- X *
- X * Permission is hereby granted to copy, reproduce, redistribute or otherwise
- X * use this software as long as: there is no monetary profit gained
- X * specifically from the use or reproduction of this software, it is not
- X * sold, rented, traded or otherwise marketed, and this copyright notice is
- X * included prominently in any copy made.
- X *
- X * The author make no claims as to the fitness or correctness of this software
- X * for any use whatsoever, and it is provided as is. Any use of this software
- X * is at the user's own risk.
- X */
- X
- X#ifndef NBRA
- X#define NBRA 10 /* the maximum number of meta-brackets in an
- X RE -- \( \) */
- X#define NALTS 10 /* the maximum number of \|'s */
- X
- typedef struct {
- X char *expbuf; /* The compiled search string */
- X int eblen; /* Length of above buffer */
- X char *alternatives[NALTS]; /* The list of \| seperated alternatives */
- X char *braslist[NBRA]; /* RE meta-bracket start list */
- X char *braelist[NBRA]; /* RE meta-bracket end list */
- X char *brastr; /* saved match string after execute() */
- X char nbra; /* The number of meta-brackets int the most
- X recenlty compiled RE */
- X bool do_folding; /* fold upper and lower case? */
- X} COMPEX;
- X
- void search_init ANSI((void));
- void init_compex ANSI((COMPEX *));
- void free_compex ANSI((COMPEX *));
- char *getbracket ANSI((COMPEX *,int));
- void case_fold ANSI((int));
- char *compile ANSI((COMPEX *,char *,int,int));
- void grow_eb ANSI((COMPEX *));
- char *execute ANSI((COMPEX *,char *));
- bool advance ANSI((COMPEX *,char *,char *));
- bool backref ANSI((COMPEX *,int,char *));
- bool cclass ANSI((char *,int,int));
- X#endif
- END_OF_FILE
- if test 1835 -ne `wc -c <'search.h'`; then
- echo shar: \"'search.h'\" unpacked with wrong size!
- fi
- # end of 'search.h'
- fi
- if test -f 'server.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'server.c'\"
- else
- echo shar: Extracting \"'server.c'\" \(765 characters\)
- sed "s/^X//" >'server.c' <<'END_OF_FILE'
- X/* $Id: server.c,v 4.4.3.1 1991/11/22 04:12:21 davison Trn $
- X**
- X** $Log: server.c,v $
- X** Revision 4.4.3.1 1991/11/22 04:12:21 davison
- X** Trn Release 2.0
- X**
- X*/
- X
- X#include "EXTERN.h"
- X#include "common.h"
- X#include "threads.h"
- X
- X#ifdef SERVER
- X
- X#include "server.h"
- X
- char *
- get_server_name(errflag)
- int errflag;
- X{
- X char *name;
- X extern char *getenv();
- X
- X if (SERVER_FILE[0] == '/') {
- X name = getserverbyfile(SERVER_FILE);
- X } else {
- X if ((name = getenv("NNTPSERVER")) == NULL)
- X name = SERVER_FILE;
- X }
- X if (name == NULL && errflag) {
- X fprintf(stderr, "Couldn't get name of news server from %s\n",
- X SERVER_FILE);
- X fprintf(stderr,
- X "Either fix this file, or put NNTPSERVER in your environment.\n");
- X }
- X return name;
- X}
- X
- X#endif /* SERVER */
- X
- END_OF_FILE
- if test 765 -ne `wc -c <'server.c'`; then
- echo shar: \"'server.c'\" unpacked with wrong size!
- fi
- # end of 'server.c'
- fi
- if test -f 'server.h.SH' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'server.h.SH'\"
- else
- echo shar: Extracting \"'server.h.SH'\" \(1395 characters\)
- sed "s/^X//" >'server.h.SH' <<'END_OF_FILE'
- X: create server.h file
- case $CONFIG in
- X '') . ./config.sh ;;
- esac
- if $test $isrrn = define
- then
- X$echo "Extracting server.h (with variable substitutions)"
- X$cat >server.h <<!GROK!THIS!
- X/*
- X * $Id$
- X *
- X * $Log$
- X *
- X *
- X * This software is Copyright 1991 by Stan Barber.
- X *
- X * Permission is hereby granted to copy, reproduce, redistribute or otherwise
- X * use this software as long as: there is no monetary profit gained
- X * specifically from the use or reproduction of this software, it is not
- X * sold, rented, traded or otherwise marketed, and this copyright notice is
- X * included prominently in any copy made.
- X *
- X * The author make no claims as to the fitness or correctness of this software
- X * for any use whatsoever, and it is provided as is. Any use of this software
- X *is at the user's own risk.
- X */
- X#ifdef SERVER
- X
- extern char *get_server_name ANSI((int));
- extern char *getserverbyfile ANSI((char *));
- extern int server_init ANSI((char *));
- extern void put_server ANSI((char *));
- extern int get_server ANSI((char *,int));
- extern long rawcheck_server ANSI((char *,int));
- extern long rawget_server ANSI((char *,long));
- extern void close_server ANSI((void));
- X
- X#include "$NNTPSRC/common/nntp.h"
- XEXT char ser_line[NNTP_STRLEN];
- X
- X# if defined(XTHREAD) && !defined(OK_BIN)
- X ?????? /* This version of NNTP doesn't have XTHREAD support */
- X# endif
- X
- X#endif
- X!GROK!THIS!
- else
- X rm -f server.h
- fi
- END_OF_FILE
- if test 1395 -ne `wc -c <'server.h.SH'`; then
- echo shar: \"'server.h.SH'\" unpacked with wrong size!
- fi
- # end of 'server.h.SH'
- fi
- if test -f 'sw.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'sw.h'\"
- else
- echo shar: Extracting \"'sw.h'\" \(999 characters\)
- sed "s/^X//" >'sw.h' <<'END_OF_FILE'
- X/* $Id: sw.h,v 4.4 1991/09/09 20:27:37 sob Exp sob $
- X *
- X * $Log: sw.h,v $
- X * Revision 4.4 1991/09/09 20:27:37 sob
- X * release 4.4
- X *
- X *
- X *
- X */
- X/* This software is Copyright 1991 by Stan Barber.
- X *
- X * Permission is hereby granted to copy, reproduce, redistribute or otherwise
- X * use this software as long as: there is no monetary profit gained
- X * specifically from the use or reproduction of this software, it is not
- X * sold, rented, traded or otherwise marketed, and this copyright notice is
- X * included prominently in any copy made.
- X *
- X * The author make no claims as to the fitness or correctness of this software
- X * for any use whatsoever, and it is provided as is. Any use of this software
- X * is at the user's own risk.
- X */
- X
- X#ifdef INNERSEARCH
- XEXT int gline INIT(0);
- X#endif
- X
- void sw_init ANSI((int,char **,char **));
- void sw_file ANSI((char **,bool_int));
- void sw_list ANSI((char *));
- void decode_switch ANSI((char *));
- void pr_switches ANSI((void));
- void cwd_check ANSI((void));
- END_OF_FILE
- if test 999 -ne `wc -c <'sw.h'`; then
- echo shar: \"'sw.h'\" unpacked with wrong size!
- fi
- # end of 'sw.h'
- fi
- if test -f 'threads.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'threads.h'\"
- else
- echo shar: Extracting \"'threads.h'\" \(2075 characters\)
- sed "s/^X//" >'threads.h' <<'END_OF_FILE'
- X/* $Id: threads.h,v 4.4.3.1 1991/11/22 04:12:21 davison Trn $
- X**
- X** $Log: threads.h,v $
- X** Revision 4.4.3.1 1991/11/22 04:12:21 davison
- X** Trn Release 2.0
- X**
- X*/
- X
- X#define DB_VERSION 2
- X
- typedef char BYTE;
- typedef short WORD;
- typedef long LONG;
- X
- X#define ROOT_ARTICLE 0x0001 /* article flag definitions */
- X#define HAS_XREFS 0x0004 /* article has an xref line */
- X
- typedef struct Article {
- X ART_NUM num;
- X char *id;
- X struct Domain *domain;
- X struct Subject *subject;
- X struct Author *author;
- X struct Article *parent, *children, *siblings;
- X struct Root *root;
- X struct Article *id_link;
- X time_t date;
- X WORD child_cnt;
- X WORD flags;
- X WORD seq;
- X} ARTICLE;
- X
- typedef struct Domain {
- X char *name;
- X ARTICLE *ids;
- X struct Domain *link;
- X} DOMAIN;
- X
- typedef struct Author {
- X struct Author *link; /* this link MUST be first */
- X char *name;
- X WORD seq;
- X WORD count;
- X} AUTHOR;
- X
- typedef struct Subject {
- X struct Subject *link; /* this link MUST be first */
- X char *str;
- X WORD seq;
- X WORD count;
- X} SUBJECT;
- X
- typedef struct Root {
- X struct Root *link; /* this link MUST be first */
- X ARTICLE *articles;
- X SUBJECT *subjects;
- X ART_NUM root_num;
- X WORD thread_cnt;
- X WORD subject_cnt;
- X WORD seq;
- X} ROOT;
- X
- typedef struct {
- X LONG root_num;
- X WORD articles;
- X WORD thread_cnt;
- X WORD subject_cnt;
- X WORD pad_hack;
- X} PACKED_ROOT;
- X
- typedef struct {
- X LONG num;
- X LONG date;
- X WORD subject, author;
- X WORD flags;
- X WORD child_cnt;
- X WORD parent;
- X WORD padding;
- X WORD siblings;
- X WORD root;
- X} PACKED_ARTICLE;
- X
- typedef struct Total {
- X LONG first, last;
- X LONG string1;
- X LONG string2;
- X WORD root;
- X WORD article;
- X WORD subject;
- X WORD author;
- X WORD domain;
- X WORD pad_hack;
- X} TOTAL;
- X
- typedef struct {
- X BYTE l[sizeof (LONG)];
- X BYTE w[sizeof (WORD)];
- X BYTE version;
- X BYTE pad_hack;
- X} BMAP;
- X
- XEXT bool word_same, long_same;
- XEXT BMAP my_bmap, mt_bmap;
- X
- char *thread_name ANSI((char *));
- void mybytemap ANSI((BMAP *));
- void wp_bmap(), lp_bmap(), swap_bmaps();
- END_OF_FILE
- if test 2075 -ne `wc -c <'threads.h'`; then
- echo shar: \"'threads.h'\" unpacked with wrong size!
- fi
- # end of 'threads.h'
- fi
- if test -f 'tm-process.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'tm-process.c'\"
- else
- echo shar: Extracting \"'tm-process.c'\" \(214 characters\)
- sed "s/^X//" >'tm-process.c' <<'END_OF_FILE'
- X/* $Id: tm-process.c,v 4.4.3.1 1991/11/22 04:12:21 davison Trn $
- X**
- X** $Log: tm-process.c,v $
- X** Revision 4.4.3.1 1991/11/22 04:12:21 davison
- X** Trn Release 2.0
- X**
- X*/
- X
- X#define TMPTHREAD
- X#include "mt-process.c"
- END_OF_FILE
- if test 214 -ne `wc -c <'tm-process.c'`; then
- echo shar: \"'tm-process.c'\" unpacked with wrong size!
- fi
- # end of 'tm-process.c'
- fi
- if test -f 'tm-read.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'tm-read.c'\"
- else
- echo shar: Extracting \"'tm-read.c'\" \(205 characters\)
- sed "s/^X//" >'tm-read.c' <<'END_OF_FILE'
- X/* $Id: tm-read.c,v 4.4.3.1 1991/11/22 04:12:21 davison Trn $
- X**
- X** $Log: tm-read.c,v $
- X** Revision 4.4.3.1 1991/11/22 04:12:21 davison
- X** Trn Release 2.0
- X**
- X*/
- X
- X#define TMPTHREAD
- X#include "mt-read.c"
- END_OF_FILE
- if test 205 -ne `wc -c <'tm-read.c'`; then
- echo shar: \"'tm-read.c'\" unpacked with wrong size!
- fi
- # end of 'tm-read.c'
- fi
- if test -f 'tm-write.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'tm-write.c'\"
- else
- echo shar: Extracting \"'tm-write.c'\" \(209 characters\)
- sed "s/^X//" >'tm-write.c' <<'END_OF_FILE'
- X/* $Id: tm-write.c,v 4.4.3.1 1991/11/22 04:12:21 davison Trn $
- X**
- X** $Log: tm-write.c,v $
- X** Revision 4.4.3.1 1991/11/22 04:12:21 davison
- X** Trn Release 2.0
- X**
- X*/
- X
- X#define TMPTHWRITE
- X#include "mt-write.c"
- END_OF_FILE
- if test 209 -ne `wc -c <'tm-write.c'`; then
- echo shar: \"'tm-write.c'\" unpacked with wrong size!
- fi
- # end of 'tm-write.c'
- fi
- if test -f 'unipatch.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'unipatch.c'\"
- else
- echo shar: Extracting \"'unipatch.c'\" \(1507 characters\)
- sed "s/^X//" >'unipatch.c' <<'END_OF_FILE'
- X/*
- A filter to turn a unified diff into a degenerate context diff (no '!'s)
- for patch. Version 1.1. Author: davison@borland.com
- X*/
- X#include <stdio.h>
- X#define ERR(a) {fputs(a,stderr);exit(1);}
- X#define NUM(x) {for(x=0;*cp<='9'&&*cp>='0';)x=x*10+*cp++-'0';ch= *cp++;}
- struct Ln {struct Ln *lk; char t; char s[1];} r,*h,*ln;
- char bf[2048],*cp,ch,*malloc();
- long os,ol,ns,nl,ne,lncnt;
- main()
- X{
- X for(;;){
- X for(;;){
- X if(!fgets(bf,sizeof bf,stdin)) exit(0);
- X lncnt++;
- X if(!strncmp(bf,"@@ -",4)) break;
- X fputs(bf,stdout);
- X }
- X ol=nl=1, cp=bf+4;
- X NUM(os)
- X if(ch==',') NUM(ol)
- X if(*cp++!='+') goto bad;
- X NUM(ns)
- X if(ch==',') NUM(nl)
- X if(*cp!='@') goto bad;
- X r.lk=0, h= &r, ne=ns+nl-1;
- X printf("***************\n*** %ld,%ld ****\n",os,os+ol-(os>0));
- X while(ol||nl){
- X if(!fgets(bf,sizeof bf,stdin)){
- X if(nl>2) ERR("Unexpected end of file.\n")
- X strcpy(bf," \n");
- X }
- X lncnt++;
- X if(*bf=='\t'||*bf=='\n') ch=' ', cp=bf;
- X else ch= *bf, cp=bf+1;
- X switch(ch){
- X case'-':if(!ol--) goto bad;
- X printf("- %s",cp);
- X break;
- X case'=':ch=' ';
- X case' ':if(!ol--) goto bad;
- X printf(" %s",cp);
- X case'+':if(!nl--) goto bad;
- X ln = (struct Ln*)malloc(sizeof(*ln)+strlen(cp));
- X if(!ln) ERR("Out of memory!\n")
- X ln->lk=0, ln->t=ch, strcpy(ln->s,cp);
- X h->lk=ln, h=ln;
- X break;
- X default:
- bad: fprintf(stderr,"Malformed unified diff at line %ld: ",lncnt);
- X ERR(bf)
- X }
- X }
- X printf("--- %ld,%ld ----\n",ns,ne);
- X for(ln=r.lk;ln;ln=h){
- X printf("%c %s",ln->t,ln->s);
- X h=ln->lk; free(ln);
- X }
- X }
- X}
- END_OF_FILE
- if test 1507 -ne `wc -c <'unipatch.c'`; then
- echo shar: \"'unipatch.c'\" unpacked with wrong size!
- fi
- # end of 'unipatch.c'
- fi
- if test -f 'util.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'util.h'\"
- else
- echo shar: Extracting \"'util.h'\" \(1805 characters\)
- sed "s/^X//" >'util.h' <<'END_OF_FILE'
- X/* $Id: util.h,v 4.4 1991/09/09 20:27:37 sob Exp sob $
- X *
- X * $Log: util.h,v $
- X * Revision 4.4 1991/09/09 20:27:37 sob
- X * release 4.4
- X *
- X *
- X *
- X */
- X/* This software is Copyright 1991 by Stan Barber.
- X *
- X * Permission is hereby granted to copy, reproduce, redistribute or otherwise
- X * use this software as long as: there is no monetary profit gained
- X * specifically from the use or reproduction of this software, it is not
- X * sold, rented, traded or otherwise marketed, and this copyright notice is
- X * included prominently in any copy made.
- X *
- X * The author make no claims as to the fitness or correctness of this software
- X * for any use whatsoever, and it is provided as is. Any use of this software
- X * is at the user's own risk.
- X */
- X
- XEXT bool waiting INIT(FALSE);
- X /* are we waiting for subprocess (in doshell)? */
- XEXT int len_last_line_got INIT(0);
- X /* strlen of some_buf after */
- X /* some_buf = get_a_line(bufptr,buffersize,fp) */
- X
- X/* is the string for makedir a directory name or a filename? */
- X
- X#define MD_DIR 0
- X#define MD_FILE 1
- X
- void util_init ANSI((void));
- int doshell ANSI((char *,char *));
- char *safemalloc ANSI((MEM_SIZE));
- char *saferealloc ANSI((char *,MEM_SIZE));
- char *safecpy ANSI((char *,char *,int));
- char *safecat ANSI((char *,char *,int));
- char *cpytill ANSI((char *,char *,int));
- char *instr ANSI((char *,char *, int));
- X#ifdef SETUIDGID
- X int eaccess ANSI((char *,int));
- X#endif
- char *getwd ANSI((char *));
- char *get_a_line ANSI((char *,int,FILE *));
- char *savestr ANSI((char *));
- int makedir ANSI((char *,int));
- void setenv ANSI((char *,char *));
- int envix ANSI((char *));
- void notincl ANSI((char *));
- char *getval ANSI((char *,char *));
- void growstr ANSI((char **,int *,int));
- void setdef ANSI((char *,char *));
- X#ifdef SERVER
- int nntp_get ANSI((char *, int));
- X#endif
- END_OF_FILE
- if test 1805 -ne `wc -c <'util.h'`; then
- echo shar: \"'util.h'\" unpacked with wrong size!
- fi
- # end of 'util.h'
- fi
- echo shar: End of archive 1 \(of 13\).
- cp /dev/null ark1isdone
- MISSING=""
- for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 ; do
- if test ! -f ark${I}isdone ; then
- MISSING="${MISSING} ${I}"
- fi
- done
- if test "${MISSING}" = "" ; then
- echo You have unpacked all 13 archives.
- rm -f ark[1-9]isdone ark[1-9][0-9]isdone
- else
- echo You still need to unpack the following archives:
- echo " " ${MISSING}
- fi
- ## End of shell archive.
- exit 0
-